diff options
author | rsc <devnull@localhost> | 2005-02-08 20:17:02 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-02-08 20:17:02 +0000 |
commit | 2acd6fa6ff4948a90a2a7338afd9a96f94637f33 (patch) | |
tree | ee1faaa6855c5677e992f5d0061368c048b78f47 /src/lib9/dirstat.c | |
parent | 0a2290523265287829036cbbc71e4cbbc80207d8 (diff) | |
download | plan9port-2acd6fa6ff4948a90a2a7338afd9a96f94637f33.tar.gz plan9port-2acd6fa6ff4948a90a2a7338afd9a96f94637f33.tar.bz2 plan9port-2acd6fa6ff4948a90a2a7338afd9a96f94637f33.zip |
expose unix mode bits
Diffstat (limited to 'src/lib9/dirstat.c')
-rw-r--r-- | src/lib9/dirstat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib9/dirstat.c b/src/lib9/dirstat.c index b46831cc..187dea7a 100644 --- a/src/lib9/dirstat.c +++ b/src/lib9/dirstat.c @@ -4,12 +4,12 @@ #include <sys/stat.h> -extern int _p9dir(struct stat*, char*, Dir*, char**, char*); +extern int _p9dir(struct stat*, struct stat*, char*, Dir*, char**, char*); Dir* dirstat(char *file) { - struct lstat lst; + struct stat lst; struct stat st; int nstr; Dir *d; @@ -18,7 +18,7 @@ dirstat(char *file) if(lstat(file, &lst) < 0) return nil; st = lst; - if((lst.mode&S_IFMT) == S_ISLNK) + if((lst.st_mode&S_IFMT) == S_IFLNK) stat(file, &st); nstr = _p9dir(&lst, &st, file, nil, nil, nil); |