From: Thomas Veerman Date: Thu, 21 Jan 2010 15:02:29 +0000 (+0000) Subject: Add return statement after failed dev_open (fixes open count in at_wini) X-Git-Tag: v3.1.6~52 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=ee2e57b4dc7878db9108e7c31e1c0d4327b46ac8;p=minix.git Add return statement after failed dev_open (fixes open count in at_wini) --- diff --git a/servers/vfs/open.c b/servers/vfs/open.c index 93cf8e889..705a770b8 100644 --- a/servers/vfs/open.c +++ b/servers/vfs/open.c @@ -142,6 +142,7 @@ PRIVATE int common_open(register int oflags, mode_t omode) /* Invoke the driver for special processing. */ dev = (dev_t) vp->v_sdev; r = dev_open(dev, who_e, bits | (oflags & ~O_ACCMODE)); + if (r != OK) break; /* Check whether the device is mounted or not. If so, then that FS is responsible for this device. Else @@ -624,8 +625,9 @@ struct filp *fp; } /* Do any special processing on device close. */ (void) dev_close(dev, fp-filp); - /* Ignore any errors, even SUSPEND. */ + + fp->filp_mode = FILP_CLOSED; } }