Commit d48a8e6e authored by Patrick Mochel's avatar Patrick Mochel

convert do_mounts.c to use sysfs instead of driverfs.

Also, update path to look for devices in to reflect placement of block
subsystem at top level.
parent 161e49bc
...@@ -101,7 +101,7 @@ static __init dev_t try_name(char *name, int part) ...@@ -101,7 +101,7 @@ static __init dev_t try_name(char *name, int part)
/* read device number from .../dev */ /* read device number from .../dev */
sprintf(path, "/sys/bus/block/devices/%s/dev", name); sprintf(path, "/sys/block/%s/dev", name);
fd = open(path, 0, 0); fd = open(path, 0, 0);
if (fd < 0) if (fd < 0)
goto fail; goto fail;
...@@ -119,7 +119,7 @@ static __init dev_t try_name(char *name, int part) ...@@ -119,7 +119,7 @@ static __init dev_t try_name(char *name, int part)
return res; return res;
/* otherwise read range from .../range */ /* otherwise read range from .../range */
sprintf(path, "/sys/bus/block/devices/%s/range", name); sprintf(path, "/sys/block/%s/range", name);
fd = open(path, 0, 0); fd = open(path, 0, 0);
if (fd < 0) if (fd < 0)
goto fail; goto fail;
...@@ -166,7 +166,7 @@ __init dev_t name_to_dev_t(char *name) ...@@ -166,7 +166,7 @@ __init dev_t name_to_dev_t(char *name)
int part; int part;
sys_mkdir("/sys", 0700); sys_mkdir("/sys", 0700);
if (sys_mount("driverfs", "/sys", "driverfs", 0, NULL) < 0) if (sys_mount("sysfs", "/sys", "sysfs", 0, NULL) < 0)
goto out; goto out;
if (strncmp(name, "/dev/", 5) != 0) { if (strncmp(name, "/dev/", 5) != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment