diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-08-17 00:05:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-18 12:45:51 -0400 |
commit | 9ef7ad22965fcd817b20c1332286f02362266534 (patch) | |
tree | 9a2c60ced8f99f6c93ca5f46b468038f627cee8a /drivers/block | |
parent | 56616ebd0e49b7e5c67a19ca1d96e8ec382bcacf (diff) |
Enable partitions for lguest block device
The lguest block device only requests one minor, which means
partitions don't work (eg "root=/dev/lgba1").
Let's follow the crowd and ask for 16.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/lguest_blk.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/block/lguest_blk.c b/drivers/block/lguest_blk.c index 93e3c4001bf5..160cf14431ac 100644 --- a/drivers/block/lguest_blk.c +++ b/drivers/block/lguest_blk.c | |||
@@ -308,9 +308,12 @@ static int lguestblk_probe(struct lguest_device *lgdev) | |||
308 | } | 308 | } |
309 | 309 | ||
310 | /* This allocates a "struct gendisk" where we pack all the information | 310 | /* This allocates a "struct gendisk" where we pack all the information |
311 | * about the disk which the rest of Linux sees. We ask for one minor | 311 | * about the disk which the rest of Linux sees. The argument is the |
312 | * number; I do wonder if we should be asking for more. */ | 312 | * number of minor devices desired: we need one minor for the main |
313 | bd->disk = alloc_disk(1); | 313 | * disk, and one for each partition. Of course, we can't possibly know |
314 | * how many partitions are on the disk (add_disk does that). | ||
315 | */ | ||
316 | bd->disk = alloc_disk(16); | ||
314 | if (!bd->disk) { | 317 | if (!bd->disk) { |
315 | err = -ENOMEM; | 318 | err = -ENOMEM; |
316 | goto out_unregister_blkdev; | 319 | goto out_unregister_blkdev; |