From 3ed2e50540fe3acf66c6dd2af6e4484b64aae58e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 13 Jun 2002 20:57:45 +0000 Subject: 2002-06-13 Roland McGrath * boot.c (ds_device_write): int -> size_t in store_write call. (ds_device_write_inband): Likewise. --- boot/boot.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/boot/boot.c b/boot/boot.c index 66054ea8..7530acf1 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -996,10 +996,13 @@ ds_device_write (device_t device, return (*bytes_written == -1 ? D_IO_ERROR : D_SUCCESS); } else if (device == pseudo_root) - return - (store_write (root_store, recnum, data, datalen, bytes_written) == 0 - ? D_SUCCESS - : D_IO_ERROR); + { + size_t wrote; + if (store_write (root_store, recnum, data, datalen, &wrote) != 0) + return D_IO_ERROR; + *bytes_written = wrote; + return D_SUCCESS; + } else return D_NO_SUCH_DEVICE; } @@ -1030,10 +1033,13 @@ ds_device_write_inband (device_t device, return (*bytes_written == -1 ? D_IO_ERROR : D_SUCCESS); } else if (device == pseudo_root) - return - (store_write (root_store, recnum, data, datalen, bytes_written) == 0 - ? D_SUCCESS - : D_IO_ERROR); + { + size_t wrote; + if (store_write (root_store, recnum, data, datalen, &wrote) != 0) + return D_IO_ERROR; + *bytes_written = wrote; + return D_SUCCESS; + } else return D_NO_SUCH_DEVICE; } -- cgit v1.2.3