diff options
author | Eric Andersen | 2004-03-15 08:29:22 +0000 |
---|---|---|
committer | Eric Andersen | 2004-03-15 08:29:22 +0000 |
commit | c7bda1ce659294d6e22c06e087f6f265983c7578 (patch) | |
tree | 4c6d2217f4d8306c59cf1096f8664e1cfd167213 /libbb/find_root_device.c | |
parent | 8854004b41065b3d081af7f3df13a100b0c8bfbe (diff) | |
download | busybox-c7bda1ce659294d6e22c06e087f6f265983c7578.zip busybox-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.gz |
Remove trailing whitespace. Update copyright to include 2004.
Diffstat (limited to 'libbb/find_root_device.c')
-rw-r--r-- | libbb/find_root_device.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libbb/find_root_device.c b/libbb/find_root_device.c index 836ce44..81824a2 100644 --- a/libbb/find_root_device.c +++ b/libbb/find_root_device.c @@ -2,7 +2,7 @@ /* * Utility routines. * - * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,7 +35,7 @@ extern char *find_real_root_device_name(const char* name) char *fileName = NULL; dev_t dev; - if (stat("/", &rootStat) != 0) + if (stat("/", &rootStat) != 0) bb_perror_msg("could not stat '/'"); else { /* This check is here in case they pass in /dev name */ @@ -45,7 +45,7 @@ extern char *find_real_root_device_name(const char* name) dev = rootStat.st_dev; dir = opendir("/dev"); - if (!dir) + if (!dir) bb_perror_msg("could not open '/dev'"); else { while((entry = readdir(dir)) != NULL) { @@ -59,9 +59,9 @@ extern char *find_real_root_device_name(const char* 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 && + if (stat(fileName, &statBuf) == 0 && S_ISBLK(statBuf.st_mode)!=0 && - statBuf.st_rdev == dev) + statBuf.st_rdev == dev) break; free(fileName); fileName=NULL; |