summaryrefslogtreecommitdiff
path: root/libbb/find_root_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/find_root_device.c')
-rw-r--r--libbb/find_root_device.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbb/find_root_device.c b/libbb/find_root_device.c
index 81824a2..2600ce5 100644
--- a/libbb/find_root_device.c
+++ b/libbb/find_root_device.c
@@ -27,7 +27,7 @@
-extern char *find_real_root_device_name(const char* name)
+extern char *find_real_root_device_name(void)
{
DIR *dir;
struct dirent *entry;
@@ -54,7 +54,11 @@ extern char *find_real_root_device_name(const char* name)
* would get a false positive on ".." */
if (myname[0] == '.' && myname[1] == '.' && !myname[2])
continue;
-
+#ifdef CONFIG_FEATURE_DEVFS
+ /* if there is a link named /dev/root skip that too */
+ if (strcmp(myname, "root")==0)
+ continue;
+#endif
fileName = concat_path_file("/dev", myname);
/* Some char devices have the same dev_t as block