[klibc] [PATCH] kinit/do_mounts.c:name_to_dev_t()
Thayne Harbaugh
tharbaugh at lnxi.com
Wed Jan 5 01:45:20 PST 2005
kinit/do_mounts.c:name_to_dev_t() has an inverted logic problem and also
doesn't return the correct value for "/dev/nfs".
--- klibc-0.194/kinit/do_mounts.c.orig 2005-01-05 01:59:29.250868616 -0700
+++ klibc-0.194/kinit/do_mounts.c 2005-01-05 02:34:30.486432256 -0700
@@ -103,7 +103,7 @@
if ( name[0] == '/' && !stat(name, &st) && S_ISBLK(st.st_mode) )
return st.st_rdev;
- if ( !strncmp(name, "/dev/", 5) ) {
+ if ( strncmp(name, "/dev/", 5) ) {
res = (dev_t) strtoul(name, &p, 16);
if (*p)
return 0;
@@ -111,7 +111,7 @@
}
name += 5;
if (strcmp(name, "nfs") == 0)
- return 0;
+ return Root_NFS;
len = strlen(name);
s = alloca(len+1);
--
Thayne Harbaugh
Linux Networx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.zytor.com/pipermail/klibc/attachments/20050105/6af08503/attachment.bin
More information about the klibc
mailing list