--- busybox-svn21977/util-linux/mdev.c 2008-05-14 15:20:18.000000000 +1000 +++ busybox/util-linux/mdev.c 2008-05-14 16:24:22.000000000 +1000 @@ -72,12 +72,10 @@ /* http://kernel.org/doc/pending/hotplug.txt says that only * "/sys/block/..." is for block devices. "/sys/bus" etc is not! * Since kernel 2.6.25 block devices are also in /sys/class/block. */ - /* TODO: would it be acceptable to just use strstr(path, "/block/")? */ - if (strncmp(&path[5], "class/block/"+6, 6) != 0 - && strncmp(&path[5], "class/block/", 12) != 0) - type = S_IFCHR; - else + if (strstr(path, "/block/") type = S_IFBLK; + else + type = S_IFCHR; if (ENABLE_FEATURE_MDEV_CONF) { FILE *fp;