From: Philip Homburg Date: Fri, 22 Feb 2008 14:49:02 +0000 (+0000) Subject: Support for O_REOPEN flag and pass the filp numbet to dev_open. X-Git-Tag: v3.1.4~267 X-Git-Url: http://zhaoyanbai.com/repos/icons/static/man.3.ps?a=commitdiff_plain;h=9388a270701f1aa2ccaa45b74a9472cf77d3ece9;p=minix.git Support for O_REOPEN flag and pass the filp numbet to dev_open. --- 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; } }