lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 7 Mar 2008 08:34:52 -0800
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Laurent Vivier <Laurent.Vivier@...l.net>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ