summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-01-17 07:06:44 +0000
committerRoland McGrath <roland@gnu.org>2001-01-17 07:06:44 +0000
commit2b5fe85bf006191f9e0c66ea00b8e00b95fe87e1 (patch)
tree817e1c00b3e4b5bc238e58c70a4ac97fcbe20107
parent42075cf7f0d0f626e8a49ed6a31461cf930f3c59 (diff)
2001-01-17 Roland McGrath <roland@frob.com>
* dev.c (dev_buf_discard): Don't check AMOUNT if store_write failed.
-rw-r--r--storeio/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/storeio/dev.c b/storeio/dev.c
index 6b7f0927..fdfc0fbd 100644
--- a/storeio/dev.c
+++ b/storeio/dev.c
@@ -47,7 +47,7 @@ dev_buf_discard (struct dev *dev)
error_t err =
store_write (store, dev->buf_offs >> store->log2_block_size,
dev->buf, store->block_size, &amount);
- if (amount < store->block_size)
+ if (!err && amount < store->block_size)
err = EIO;
if (err)
return err;