From 4e015aefeea3e11e6a0afd32cdbe0fb82dbcdba0 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 May 1996 21:18:41 +0000 Subject: (store_device_create, _store_device_create): Use store_run, not off_t, vectors; tweak accordingly. --- libstore/device.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libstore') diff --git a/libstore/device.c b/libstore/device.c index ce15d3a4..e42274f9 100644 --- a/libstore/device.c +++ b/libstore/device.c @@ -62,7 +62,7 @@ device_meths = {dev_read, dev_write}; error_t store_device_create (device_t device, struct store **store) { - off_t runs[2]; + struct store_run run; size_t sizes[DEV_GET_SIZE_COUNT], block_size; size_t sizes_len = DEV_GET_SIZE_COUNT; error_t err = device_get_status (device, DEV_GET_SIZE, sizes, &sizes_len); @@ -73,16 +73,16 @@ store_device_create (device_t device, struct store **store) assert (sizes_len == DEV_GET_SIZE_COUNT); block_size = sizes[DEV_GET_SIZE_RECORD_SIZE]; - runs[0] = 0; - runs[1] = sizes[DEV_GET_SIZE_DEVICE_SIZE] / block_size; + run.start = 0; + run.length = sizes[DEV_GET_SIZE_DEVICE_SIZE] / block_size; - return _store_device_create (device, block_size, runs, 2, store); + return _store_device_create (device, block_size, &run, 1, store); } /* Like store_device_create, but doesn't query the device for information. */ error_t _store_device_create (device_t device, size_t block_size, - const off_t *runs, size_t num_runs, + const struct store_run *runs, size_t num_runs, struct store **store) { *store = _make_store (STORAGE_DEVICE, &device_meths, device, block_size, -- cgit v1.2.3