diff options
| author | Mike Smith <msmith@FreeBSD.org> | 2000-09-05 09:52:50 +0000 |
|---|---|---|
| committer | Mike Smith <msmith@FreeBSD.org> | 2000-09-05 09:52:50 +0000 |
| commit | ba20acfdb2d791debd23735a1af62d29b71917c0 (patch) | |
| tree | 2ac5beee4f809661e6d9b5846125624dd6da758f /lib/libstand/open.c | |
| parent | bade5944c91803fe7d6e0b1ca9365dd2c590b0d7 (diff) | |
Notes
Diffstat (limited to 'lib/libstand/open.c')
| -rw-r--r-- | lib/libstand/open.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libstand/open.c b/lib/libstand/open.c index 3a9127ccf116..471f93745f01 100644 --- a/lib/libstand/open.c +++ b/lib/libstand/open.c @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /* $NetBSD: open.c,v 1.16 1997/01/28 09:41:03 pk Exp $ */ /*- @@ -79,6 +80,13 @@ o_gethandle(void) return(-1); } +static void +o_rainit(struct open_file *f) +{ + f->f_rabuf = malloc(SOPEN_RASIZE); + f->f_ralen = 0; + f->f_raoffset = 0; +} int open(const char *fname, int mode) @@ -118,6 +126,7 @@ open(const char *fname, int mode) if (error == 0) { f->f_ops = file_system[i]; + o_rainit(f); return (fd); } if (error != EINVAL) |
