aboutsummaryrefslogtreecommitdiff
path: root/libbb/find_root_device.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-05-26 14:07:50 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-05-26 14:07:50 +0000
commit393183dccc4d100366972bdbbdc6e03a77839120 (patch)
treed2e94dac0f1f5da5cb3ecb927b78c4c2a02f4ea6 /libbb/find_root_device.c
parentddfe18df75c15be4a2aadddb241c3b86b1e2968a (diff)
downloadbusybox-w32-393183dccc4d100366972bdbbdc6e03a77839120.tar.gz
busybox-w32-393183dccc4d100366972bdbbdc6e03a77839120.tar.bz2
busybox-w32-393183dccc4d100366972bdbbdc6e03a77839120.zip
Vodz, last_patch_86
Diffstat (limited to 'libbb/find_root_device.c')
-rw-r--r--libbb/find_root_device.c7
1 files changed, 2 insertions, 5 deletions
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)
49 else { 49 else {
50 while((entry = readdir(dir)) != NULL) { 50 while((entry = readdir(dir)) != NULL) {
51 51
52 /* Must skip ".." since that is "/", and so we 52 fileName = concat_subpath_file("/dev", entry->d_name);
53 * would get a false positive on ".." */ 53 if(fileName == NULL)
54 if (strcmp(entry->d_name, "..") == 0)
55 continue; 54 continue;
56 55
57 fileName = concat_path_file("/dev", entry->d_name);
58
59 /* Some char devices have the same dev_t as block 56 /* Some char devices have the same dev_t as block
60 * devices, so make sure this is a block device */ 57 * devices, so make sure this is a block device */
61 if (stat(fileName, &statBuf) == 0 && 58 if (stat(fileName, &statBuf) == 0 &&