diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/block_dev.c | 2 | ||||
| -rw-r--r-- | fs/partitions/check.c | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index d84f0469a016..218408eed1bb 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
| @@ -1262,7 +1262,7 @@ EXPORT_SYMBOL(ioctl_by_bdev); | |||
| 1262 | 1262 | ||
| 1263 | /** | 1263 | /** |
| 1264 | * lookup_bdev - lookup a struct block_device by name | 1264 | * lookup_bdev - lookup a struct block_device by name |
| 1265 | * @pathname: special file representing the block device | 1265 | * @path: special file representing the block device |
| 1266 | * | 1266 | * |
| 1267 | * Get a reference to the blockdevice at @pathname in the current | 1267 | * Get a reference to the blockdevice at @pathname in the current |
| 1268 | * namespace if possible and return it. Return ERR_PTR(error) | 1268 | * namespace if possible and return it. Return ERR_PTR(error) |
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index fbeb2f372a93..cfb0c80690aa 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
| @@ -195,6 +195,14 @@ check_partition(struct gendisk *hd, struct block_device *bdev) | |||
| 195 | return ERR_PTR(res); | 195 | return ERR_PTR(res); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | static ssize_t part_partition_show(struct device *dev, | ||
| 199 | struct device_attribute *attr, char *buf) | ||
| 200 | { | ||
| 201 | struct hd_struct *p = dev_to_part(dev); | ||
| 202 | |||
| 203 | return sprintf(buf, "%d\n", p->partno); | ||
| 204 | } | ||
| 205 | |||
| 198 | static ssize_t part_start_show(struct device *dev, | 206 | static ssize_t part_start_show(struct device *dev, |
| 199 | struct device_attribute *attr, char *buf) | 207 | struct device_attribute *attr, char *buf) |
| 200 | { | 208 | { |
| @@ -260,6 +268,7 @@ ssize_t part_fail_store(struct device *dev, | |||
| 260 | } | 268 | } |
| 261 | #endif | 269 | #endif |
| 262 | 270 | ||
| 271 | static DEVICE_ATTR(partition, S_IRUGO, part_partition_show, NULL); | ||
| 263 | static DEVICE_ATTR(start, S_IRUGO, part_start_show, NULL); | 272 | static DEVICE_ATTR(start, S_IRUGO, part_start_show, NULL); |
| 264 | static DEVICE_ATTR(size, S_IRUGO, part_size_show, NULL); | 273 | static DEVICE_ATTR(size, S_IRUGO, part_size_show, NULL); |
| 265 | static DEVICE_ATTR(stat, S_IRUGO, part_stat_show, NULL); | 274 | static DEVICE_ATTR(stat, S_IRUGO, part_stat_show, NULL); |
| @@ -269,6 +278,7 @@ static struct device_attribute dev_attr_fail = | |||
| 269 | #endif | 278 | #endif |
| 270 | 279 | ||
| 271 | static struct attribute *part_attrs[] = { | 280 | static struct attribute *part_attrs[] = { |
| 281 | &dev_attr_partition.attr, | ||
| 272 | &dev_attr_start.attr, | 282 | &dev_attr_start.attr, |
| 273 | &dev_attr_size.attr, | 283 | &dev_attr_size.attr, |
| 274 | &dev_attr_stat.attr, | 284 | &dev_attr_stat.attr, |
