From: Ben Gras Date: Wed, 28 Jun 2006 10:03:18 +0000 (+0000) Subject: Fix bug where safe conversion doesn't happen after 1st time in loop X-Git-Tag: v3.1.3~278 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/processing.js?a=commitdiff_plain;h=f9fb0ff54644ff2d71ead2794920bf58bd4b34e3;p=minix.git Fix bug where safe conversion doesn't happen after 1st time in loop --- diff --git a/servers/fs/device.c b/servers/fs/device.c index 32f1029a1..4c0853055 100644 --- a/servers/fs/device.c +++ b/servers/fs/device.c @@ -297,6 +297,7 @@ int bytes; /* how many bytes to transfer */ for (;;) { + int op_used; static cp_grant_id_t gids[NR_IOREQS]; cp_grant_id_t gid = GRANT_INVALID; int vec_grants; @@ -312,12 +313,14 @@ int bytes; /* how many bytes to transfer */ m.ADDRESS = buf; /* Convert parameters to 'safe mode'. */ + op_used = op; safe = safe_io_conversion(dp->dmap_driver, dev, &gid, - &op, gids, NR_IOREQS, &m.IO_ENDPT, buf, &vec_grants, bytes, &pos); + &op_used, gids, NR_IOREQS, &m.IO_ENDPT, buf, + &vec_grants, bytes, &pos); /* Set up rest of the message. */ if(safe) m.IO_GRANT = (char *) gid; - m.m_type = op; + m.m_type = op_used; m.DEVICE = (dev >> MINOR) & BYTE; m.POSITION = pos; m.COUNT = bytes;