summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-01-21 00:57:11 +0000
committerRoland McGrath <roland@gnu.org>2001-01-21 00:57:11 +0000
commit7e41f9eed28122c2ee4fd77bdf5227e7663cd6fd (patch)
treec3e3dc658ae13aef4e6744e698bad6e70787f09f /trans
parent1e15f1a50b6ff1de27220f3f637fc313da2efb64 (diff)
2001-01-20 Roland McGrath <roland@frob.com>
* streamio.c (options): Add aliases --rdonly, --ro for -r. Add aliases --rdwr, -rw for -w. Add new option --writeonly/--wronly/-W. (readonly): Variable removed. (parse_opt): Set trivfs_allow_open for -r/-w/-W. (main): Don't set trivfs_allow_open here. Instead, use it to decide whether to set up input_buffer/output_buffer or not. (open_hook): Use trivfs_allow_open instead of readonly. Check whether read is allowed too. (trivfs_modify_stat): Likewise. (clear_buffer): Do nothing if argument is null. * streamio.c (stream_name, readonly, rdev, nperopens): Remove superfluous zero initializers.
Diffstat (limited to 'trans')
-rw-r--r--trans/streamio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/trans/streamio.c b/trans/streamio.c
index 13714239..c1acc8a2 100644
--- a/trans/streamio.c
+++ b/trans/streamio.c
@@ -104,6 +104,8 @@ buffer_writable (struct buffer *b)
extern inline void
clear_buffer (struct buffer *b)
{
+ if (b == 0)
+ return;
b->head = b->tail = b->buf;
condition_broadcast (b->wait);
}