instead of silently creating a regular file.
#define VCHR S_IFCHR
#define VLNK S_IFLNK
#define VSOCK S_IFSOCK
+#define VFIFO S_IFIFO
/* vcexcl - used only by afs_create */
enum vcexcl { EXCL, NONEXCL } ;
code = EINVAL;
goto done;
}
-#if defined(AFS_SUN5_ENV)
- if ((attrs->va_type == VBLK) || (attrs->va_type == VCHR)) {
-#else
- if ((attrs->va_type == VBLK) || (attrs->va_type == VCHR) || (attrs->va_type == VSOCK)) {
+ switch (attrs->va_type) {
+ case VBLK:
+ case VCHR:
+#if !defined(AFS_SUN5_ENV)
+ case VSOCK:
#endif
- /* We don't support special devices */
+ case VFIFO:
+ /* We don't support special devices or FIFOs */
code = EINVAL;
goto done;
+ default:
+ ;
}
code = afs_EvalFakeStat(&adp, &fakestate, &treq);
if (code) goto done;