From: Randy Dunlap <randy.dunlap@oracle.com>
To: Laurent Vivier <Laurent.Vivier@bull.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][v2] Modify loop device to be able to manage partitions of the disk image
Date: Fri, 7 Mar 2008 08:34:52 -0800 [thread overview]
Message-ID: <20080307083452.b403fedf.randy.dunlap@oracle.com> (raw)
In-Reply-To: <12048928601734-git-send-email-Laurent.Vivier@bull.net>
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
prev parent reply other threads:[~2008-03-07 16:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-07 12:27 Laurent Vivier
2008-03-07 12:33 ` Andreas Schwab
2008-03-07 12:45 ` Laurent Vivier
2008-03-07 16:34 ` Randy Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080307083452.b403fedf.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=Laurent.Vivier@bull.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®