diff options
author | des <des@FreeBSD.org> | 2001-09-30 19:41:29 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2001-09-30 19:41:29 +0000 |
commit | 27969af8941a80dfb7c17d93fd5af1878a1197db (patch) | |
tree | d1e5f29566095526fac1958b3cd0437fa2c2ecdb /sys/fs/pseudofs/pseudofs.h | |
parent | 9f3535edc71a604511fd344a17ed72e7e21db7a1 (diff) | |
download | FreeBSD-src-27969af8941a80dfb7c17d93fd5af1878a1197db.zip FreeBSD-src-27969af8941a80dfb7c17d93fd5af1878a1197db.tar.gz |
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.
Diffstat (limited to 'sys/fs/pseudofs/pseudofs.h')
-rw-r--r-- | sys/fs/pseudofs/pseudofs.h | 7 |
1 files changed, 4 insertions, 3 deletions
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 |