diff options
author | Roland McGrath <roland@gnu.org> | 2002-06-13 20:57:45 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-06-13 20:57:45 +0000 |
commit | 3ed2e50540fe3acf66c6dd2af6e4484b64aae58e (patch) | |
tree | 241b21ff190f10551717ba9ca86cd036c825b9be /boot | |
parent | 6069da779f763df800ebbcec348b985ecc972a78 (diff) |
2002-06-13 Roland McGrath <roland@frob.com>
* boot.c (ds_device_write): int -> size_t in store_write call.
(ds_device_write_inband): Likewise.
Diffstat (limited to 'boot')
-rw-r--r-- | boot/boot.c | 22 |
1 files 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; } |