mknod fails for major/minor number greater than 255
Jorge Pereira
jpereiran at gmail.com
Thu Mar 13 14:39:46 UTC 2008
i agre,
jjpn at campinho debug.main.x86$ grep __kernel_dev_t -n
/usr/include/linux/types.h
10:typedef __u32 __kernel_dev_t;
13:typedef __kernel_dev_t dev_t;
jjpn at campinho debug.main.x86$
this operation is very simple...i don't think other solution for this.
[]s
On Tue, Mar 11, 2008 at 10:47 AM, Basheer, Mansoor Ahamed <
mansoor.ahamed at ti.com> wrote:
> Current mknod implementation fails for major/minor number greater than
> 255.
>
> I'm suggesting following change. Please comment.
>
> -Mansoor
>
> Signed-off-by: Mansoor Ahamed <mansoor.ahamed at ti.com>
>
> --- uClibc/libc/sysdeps/linux/common/mknod.c 2008-03-11
> 17:43:54.000000000 +0530
> +++ uClibc-new/libc/sysdeps/linux/common/mknod.c 2008-03-11
> 17:45:21.000000000 +0530
> @@ -20,9 +20,8 @@ static inline _syscall3(int, __syscall_m
> int mknod(const char *path, mode_t mode, dev_t dev)
> {
> /* We must convert the dev_t value to a __kernel_dev_t */
> - __kernel_dev_t k_dev;
> + __kernel_dev_t k_dev = (__kernel_dev_t)dev;
>
> - k_dev = ((major(dev) & 0xff) << 8) | (minor(dev) & 0xff);
> return __syscall_mknod(path, mode, k_dev);
> }
> libc_hidden_def(mknod)
>
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://busybox.net/cgi-bin/mailman/listinfo/uclibc
>
--
Regards,
+
---------------------------------------------------------------------------------+
Jorge Pereira, From: Olinda/Pe/Brazil
Home: http://www.jorgepereira.com.br/
E-mail: jpereiran at gmail.com, jorge at jorgepereira.com.br
Mobile: +55 (81) 8833-2484
My Public Key: http://www.jorgepereira.com.br/public.pgp
+
---------------------------------------------------------------------------------+
"Se você ama alguma coisa, liberte-a;
Se ela não voltar a ti, cace-a e mate-a."
+----------------------------------------------------------------------------------+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20080313/8852017c/attachment-0002.htm
More information about the uClibc
mailing list