lkml.org 
[lkml]   [2008]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][v2] Modify loop device to be able to manage partitions of the disk image
On Fri,  7 Mar 2008 13:27:40 +0100 Laurent Vivier wrote:

> This patch allows to use loop device with partitionned disk image.
>
> Original behavior of loop is not modified.
>
> A new parameter is introduced to define how many partition we want to be
> able to manage per loop device. This parameter is "loop_max_part".
>
> __setup("max_loop=", max_loop_setup);
> +
> +static int __init max_part_setup(char *str)
> +{
> + loop_max_part = simple_strtol(str, NULL, 0);
> + if (loop_max_part > (1UL << (MINORBITS - 1))) {
> + /* we must keep at least one bit for loop device number */
> + printk(KERN_ERR
> + "loop: loop_max_part cannot be greater than %d\n",

That %d should be %lu, otherwise gcc says:

drivers/block/loop.c:1594: warning: format '%d' expects type 'int', but ar
gument 2 has type 'long unsigned int

> + 1UL << (MINORBITS - 1));
> + return 0;
> + }
> + return 1;
> +}
> +
> +__setup("loop_max_part=", max_part_setup);
> #endif

---
~Randy


\
 
 \ /
  Last update: 2008-03-07 17:45    [W:0.044 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site