summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorsascha <sascha@nomad.localdomain>2007-10-16 16:41:05 +0200
committersascha <sascha@nomad.localdomain>2007-10-16 16:41:05 +0200
commit6b8e56295f29dd8ad488aacfa0ec0fe9c186ca5c (patch)
tree59f7ff602b26479edbc53f0328d92ee46f07773d /fs
parent25850aa80a97c5efd51a24c920d19a4daad44ce5 (diff)
downloadbarebox-6b8e56295f29dd8ad488aacfa0ec0fe9c186ca5c.tar.gz
barebox-6b8e56295f29dd8ad488aacfa0ec0fe9c186ca5c.tar.xz
use S_ISDIR macro in open()
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 5b0681dd68..a613b1ae2b 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -370,7 +370,7 @@ int open(const char *pathname, int flags, ...)
exist = (stat(path, &s) == 0) ? 1 : 0;
- if (exist && (s.st_mode & S_IFDIR)) {
+ if (exist && S_ISDIR(s.st_mode)) {
errno = -EISDIR;
goto out1;
}