summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-01-17 21:00:15 +0000
committerMiles Bader <miles@gnu.org>1996-01-17 21:00:15 +0000
commitc3b1e3f0f7227701b9e567fbada957113654a2d0 (patch)
tree602989c61a7bd31590eb961b4e7b193b6921c3f0
parent3d11ffb0db837a14638f362f1be1b4c30ca1d35d (diff)
Formerly device.c.~3~
-rw-r--r--libstore/device.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/libstore/device.c b/libstore/device.c
index 520482cd..71c89dad 100644
--- a/libstore/device.c
+++ b/libstore/device.c
@@ -1,6 +1,6 @@
-/* Mach device backend
+/* Mach device store backend
- Copyright (C) 1995 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -61,23 +61,16 @@ store_device_create (device_t device, struct store **store)
runs[0] = 0;
runs[1] = sizes[DEV_GET_SIZE_DEVICE_SIZE] / block_size;
- return _store_device_create (device, runs, 2, block_size, store);
+ return _store_device_create (device, block_size, runs, 2, store);
}
/* Like store_device_create, but doesn't query the device for information. */
error_t
-_store_device_create (device_t device,
- off_t *runs, unsigned runs_len, size_t block_size,
+_store_device_create (device_t device, size_t block_size,
+ off_t *runs, unsigned runs_len,
struct store **store)
{
- *store = _make_store (STORAGE_DEVICE, &device_meths);
-
- if (!*store)
- return ENOMEM;
-
- (*store)->block_size = block_size;
- store_set_runs (*store, runs, runs_len);
- _store_derive (*store);
-
- return 0;
+ *store = _make_store (STORAGE_DEVICE, &device_meths, device, block_size,
+ runs, runs_len);
+ return *store ? 0 : ENOMEM;
}