From 393183dccc4d100366972bdbbdc6e03a77839120 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Mon, 26 May 2003 14:07:50 +0000 Subject: Vodz, last_patch_86 --- libbb/find_root_device.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libbb/find_root_device.c') diff --git a/libbb/find_root_device.c b/libbb/find_root_device.c index 763ac7519..b12d392a2 100644 --- a/libbb/find_root_device.c +++ b/libbb/find_root_device.c @@ -49,13 +49,10 @@ extern char *find_real_root_device_name(const char* name) else { while((entry = readdir(dir)) != NULL) { - /* Must skip ".." since that is "/", and so we - * would get a false positive on ".." */ - if (strcmp(entry->d_name, "..") == 0) + fileName = concat_subpath_file("/dev", entry->d_name); + if(fileName == NULL) continue; - fileName = concat_path_file("/dev", entry->d_name); - /* Some char devices have the same dev_t as block * devices, so make sure this is a block device */ if (stat(fileName, &statBuf) == 0 && -- cgit v1.2.3