diff options
Diffstat (limited to 'drivers/block/brd.c')
-rw-r--r-- | drivers/block/brd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/block/brd.c b/drivers/block/brd.c index c7d138eca731..3598110d2cef 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c | |||
@@ -442,12 +442,15 @@ static int rd_nr; | |||
442 | int rd_size = CONFIG_BLK_DEV_RAM_SIZE; | 442 | int rd_size = CONFIG_BLK_DEV_RAM_SIZE; |
443 | static int max_part; | 443 | static int max_part; |
444 | static int part_shift; | 444 | static int part_shift; |
445 | static int part_show = 0; | ||
445 | module_param(rd_nr, int, S_IRUGO); | 446 | module_param(rd_nr, int, S_IRUGO); |
446 | MODULE_PARM_DESC(rd_nr, "Maximum number of brd devices"); | 447 | MODULE_PARM_DESC(rd_nr, "Maximum number of brd devices"); |
447 | module_param(rd_size, int, S_IRUGO); | 448 | module_param(rd_size, int, S_IRUGO); |
448 | MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes."); | 449 | MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes."); |
449 | module_param(max_part, int, S_IRUGO); | 450 | module_param(max_part, int, S_IRUGO); |
450 | MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk"); | 451 | MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk"); |
452 | module_param(part_show, int, S_IRUGO); | ||
453 | MODULE_PARM_DESC(part_show, "Control RAM disk visibility in /proc/partitions"); | ||
451 | MODULE_LICENSE("GPL"); | 454 | MODULE_LICENSE("GPL"); |
452 | MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR); | 455 | MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR); |
453 | MODULE_ALIAS("rd"); | 456 | MODULE_ALIAS("rd"); |
@@ -501,7 +504,8 @@ static struct brd_device *brd_alloc(int i) | |||
501 | disk->fops = &brd_fops; | 504 | disk->fops = &brd_fops; |
502 | disk->private_data = brd; | 505 | disk->private_data = brd; |
503 | disk->queue = brd->brd_queue; | 506 | disk->queue = brd->brd_queue; |
504 | disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO; | 507 | if (!part_show) |
508 | disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO; | ||
505 | sprintf(disk->disk_name, "ram%d", i); | 509 | sprintf(disk->disk_name, "ram%d", i); |
506 | set_capacity(disk, rd_size * 2); | 510 | set_capacity(disk, rd_size * 2); |
507 | 511 | ||