[dm-devel] [PATCH] 2.4: dm-table.c: Recognize devices names of the form "type(a,b)"
Kevin Corry
corryk at us.ibm.com
Mon Mar 3 13:36:01 UTC 2003
On Monday 03 March 2003 13:16, Kevin Corry wrote:
> In dm_get_device(), also look for device strings of the form:
> type(major,minor)
> where major and minor are decimal (not hex). This allows table status
> strings returned by DM to be fed back into DM for create or reload.
>
> --- linux-2.4.20a/drivers/md/dm-table.c 2003/02/13 16:33:46
> +++ linux-2.4.20b/drivers/md/dm-table.c 2003/03/03 19:08:54
> @@ -388,6 +388,8 @@
> if (sscanf(path, "%x:%x", &major, &minor) == 2) {
> /* Extract the major/minor numbers */
> dev = mk_kdev(major, minor);
> + } else if (sscanf(path, "%*s(%d,%d)", &major, &minor) == 2) {
> + dev = mk_kdev(major, minor);
> } else {
> /* convert the path to a device */
> if ((r = lookup_device(path, &dev)))
>
Upon further investigation, it does not seem that the kernel's version of
sscanf correctly implements %*. Will have to come up with a different patch.
Sorry. :(
--
Kevin Corry
corryk at us.ibm.com
http://evms.sourceforge.net/
More information about the dm-devel
mailing list