diff options
author | Roland McGrath <roland@gnu.org> | 2002-05-16 21:02:50 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-05-16 21:02:50 +0000 |
commit | acbcae5fa16930633e2e7b2d340f634e5e784d50 (patch) | |
tree | 1ce0119222a956db5ea710fde0ca6478d1c57b2b /libstore | |
parent | d71de7c2b61cb838bd6bb0bab4facc6a7aa8679b (diff) |
2002-05-16 Roland McGrath <roland@frob.com>
* device.c (enforced): Use dev_status_data_t for SIZES.
(store_device_create): Likewise.
(dev_write): Do some silly magic since device.defs uses int.
Diffstat (limited to 'libstore')
-rw-r--r-- | libstore/device.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libstore/device.c b/libstore/device.c index fa347bea..ffcf999a 100644 --- a/libstore/device.c +++ b/libstore/device.c @@ -62,8 +62,11 @@ dev_write (struct store *store, const void *buf, mach_msg_type_number_t len, mach_msg_type_number_t *amount) { - return dev_error (device_write (store->port, 0, addr, - (io_buf_ptr_t)buf, len, amount)); + error_t err = dev_error (device_write (store->port, 0, addr, + (io_buf_ptr_t)buf, len, + (int *) amount)); + *amount = *(int *) amount; /* stupid device.defs uses int */ + return err; } static error_t @@ -119,7 +122,7 @@ static error_t enforced (struct store *store) { error_t err; - size_t sizes[DEV_STATUS_MAX]; + dev_status_data_t sizes; size_t sizes_len = DEV_STATUS_MAX; if (store->num_runs != 1 || store->runs[0].start != 0) @@ -248,7 +251,7 @@ store_device_create (device_t device, int flags, struct store **store) { struct store_run run; size_t block_size = 0; - size_t sizes[DEV_STATUS_MAX]; + dev_status_data_t sizes; size_t sizes_len = DEV_STATUS_MAX; error_t err; |