wrowe 2002/12/16 17:08:12
Modified: file_io/netware filestat.c
Log:
Brad, please review. Adopt the alternate 'UNKFILE' if we failed
to S_ISxxx() the file. Note: might as well drag over the unix code,
or better yet, start using the unix filestat if it's this tightly
applicable.
Revision Changes Path
1.20 +8 -6 apr/file_io/netware/filestat.c
Index: filestat.c
===================================================================
RCS file: /home/cvs/apr/file_io/netware/filestat.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- filestat.c 6 Nov 2002 17:08:52 -0000 1.19
+++ filestat.c 17 Dec 2002 01:08:12 -0000 1.20
@@ -67,18 +67,20 @@
if (S_ISREG(mode))
type = APR_REG;
- if (S_ISDIR(mode))
+ else if (S_ISDIR(mode))
type = APR_DIR;
- if (S_ISCHR(mode))
+ else if (S_ISCHR(mode))
type = APR_CHR;
- if (S_ISBLK(mode))
+ else if (S_ISBLK(mode))
type = APR_BLK;
- if (S_ISFIFO(mode))
+ else if (S_ISFIFO(mode))
type = APR_PIPE;
- if (S_ISLNK(mode))
+ else if (S_ISLNK(mode))
type = APR_LNK;
- if (S_ISSOCK(mode))
+ else if (S_ISSOCK(mode))
type = APR_SOCK;
+ else
+ type = APR_UNKFILE;
return type;
}