From 9388a270701f1aa2ccaa45b74a9472cf77d3ece9 Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Fri, 22 Feb 2008 14:49:02 +0000 Subject: [PATCH] Support for O_REOPEN flag and pass the filp numbet to dev_open. --- servers/vfs/misc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/servers/vfs/misc.c b/servers/vfs/misc.c index 5d24df96c..f1a41b07f 100644 --- a/servers/vfs/misc.c +++ b/servers/vfs/misc.c @@ -194,7 +194,7 @@ PUBLIC int do_fcntl() case F_SETFL: /* Set file status flags (O_NONBLOCK and O_APPEND). */ - fl = O_NONBLOCK | O_APPEND; + fl = O_NONBLOCK | O_APPEND | O_REOPEN; f->filp_flags = (f->filp_flags & ~fl) | (m_in.addr & fl); return(OK); @@ -457,7 +457,10 @@ PRIVATE void free_proc(struct fproc *exiter, int flags) vp = rfilp->filp_vno; if ((vp->v_mode & I_TYPE) != I_CHAR_SPECIAL) continue; if ((dev_t) vp->v_sdev != dev) continue; - dev_close(dev); + + (void) dev_close(dev, rfilp-filp); + /* Ignore any errors, even SUSPEND. */ + rfilp->filp_mode = FILP_CLOSED; } } -- 2.44.0