From: Philip Homburg Date: Fri, 22 Feb 2008 14:26:41 +0000 (+0000) Subject: Pass suspend_reopen flag to dev_io. X-Git-Tag: v3.1.4~270 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.named-checkzone.html?a=commitdiff_plain;h=6ef71b8198cffbbd65f6b68526df899e3c8910ef;p=minix.git Pass suspend_reopen flag to dev_io. --- diff --git a/servers/vfs/read.c b/servers/vfs/read.c index 8c874d0b1..dde6b8c97 100644 --- a/servers/vfs/read.c +++ b/servers/vfs/read.c @@ -119,15 +119,19 @@ int rw_flag; /* READING or WRITING */ /* Character special files. */ if (char_spec) { - dev_t dev; - /*dev = (dev_t) f->filp_ino->i_zone[0];*/ - dev = (dev_t) vp->v_sdev; - r = dev_io(op, dev, usr, m_in.buffer, position, m_in.nbytes, oflags); - if (r >= 0) { - cum_io = r; - position = add64ul(position, r); - r = OK; - } + dev_t dev; + int suspend_reopen; + + suspend_reopen= (f->filp_state != FS_NORMAL); + + dev = (dev_t) vp->v_sdev; + r = dev_io(op, dev, usr, m_in.buffer, position, m_in.nbytes, oflags, + suspend_reopen); + if (r >= 0) { + cum_io = r; + position = add64ul(position, r); + r = OK; + } } /* Block special files. */ else if (block_spec) {