From 2b5fe85bf006191f9e0c66ea00b8e00b95fe87e1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Jan 2001 07:06:44 +0000 Subject: 2001-01-17 Roland McGrath * dev.c (dev_buf_discard): Don't check AMOUNT if store_write failed. --- storeio/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3