From 27969af8941a80dfb7c17d93fd5af1878a1197db Mon Sep 17 00:00:00 2001 From: des Date: Sun, 30 Sep 2001 19:41:29 +0000 Subject: pseudofs.h: - Rearrange the flag constants a little to simplify specifying and testing for readability and writeability. pseudofs_vnops.c: - Track the aforementioned change. - Add checks to pfs_open() to prevent opening read-only files for writing or vice versa (pfs_{read,write} would block the actual reads and writes, but it's still a bug to allow the open() to succeed). Also, return EOPNOTSUPP if the caller attempts to lock the file. - Add more trace points. --- sys/fs/pseudofs/pseudofs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/fs/pseudofs/pseudofs.h') diff --git a/sys/fs/pseudofs/pseudofs.h b/sys/fs/pseudofs/pseudofs.h index 4b2ec2a..8bff258 100644 --- a/sys/fs/pseudofs/pseudofs.h +++ b/sys/fs/pseudofs/pseudofs.h @@ -51,11 +51,12 @@ typedef enum { /* * Flags */ -#define PFS_RDONLY 0x0000 /* read-only (default) */ -#define PFS_WRONLY 0x0001 /* write-only */ -#define PFS_RDWR 0x0002 /* read-write */ +#define PFS_RD 0x0001 /* readable */ +#define PFS_WR 0x0002 /* writeable */ +#define PFS_RDWR (PFS_RD|PFS_WR) #define PFS_RAWRD 0x0004 /* raw reader */ #define PFS_RAWWR 0x0008 /* raw writer */ +#define PFS_RAW (PFS_RAWRD|PFS_RAWWR) /* * Data structures -- cgit v1.1