summaryrefslogtreecommitdiff
path: root/libstore/store.h
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2002-12-03 17:47:06 +0000
committerMarcus Brinkmann <marcus@gnu.org>2002-12-03 17:47:06 +0000
commitf56926743a89f4aa10302b5837aebaf5817a4e01 (patch)
tree98dc8f09cd60212c10adc5cb9318416de8bf3403 /libstore/store.h
parent08d35f341d827556553d93d705f78a5319aa0619 (diff)
doc/
2002-12-03 Marcus Brinkmann <marcus@gnu.org> * hurd.texi (Store I/O): Add store_set_size. libstore/ 2002-10-01 Ludovic Courtès <ludovic.courtes@utbm.fr> * store.h: New type store_set_size_meth_t: New type. New prototype store_set_size. (struct store_class): Added a set_size () method. * rdwr.c (store_set_size): New function. * file.c (file_store_set_size): New function. (store_file_class): Add file_store_set_size. * concat.c (concat_set_size): New function. (store_concat_class): concat_set_size. * copy.c (copy_set_size): New function. (store_copy_class): copy_set_size. * device.c (device_set_size): New function. (store_device_class): device_set_size. * memobj.c (memobj_set_size): New function. (store_memobj_class): memobj_set_size. * mvol.c (mvol_set_size): New function. (store_mvol_class): mvol_set_size. * nbd.c (nbd_set_size): New function. (store_nbd_class): nbd_set_size. * remap.c (remap_set_size): New function. (store_remap_class): remap_set_size. * stripe.c (stripe_set_size): New function. (store_stripe_class): stripe_set_size. * unknown.c (unknown_set_size): New function. (store_unknown_class): unknown_set_size. * zero.c (zero_set_size): New function. (store_zero_class): zero_set_size.
Diffstat (limited to 'libstore/store.h')
-rw-r--r--libstore/store.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/libstore/store.h b/libstore/store.h
index ee0a2d21..9d9ee712 100644
--- a/libstore/store.h
+++ b/libstore/store.h
@@ -132,6 +132,8 @@ typedef error_t (*store_read_meth_t)(struct store *store,
store_offset_t addr, size_t index,
mach_msg_type_number_t amount,
void **buf, mach_msg_type_number_t *len);
+typedef error_t (*store_set_size_meth_t)(struct store *store,
+ size_t newsize);
struct store_enc; /* fwd decl */
@@ -144,11 +146,13 @@ struct store_class
const char *name;
/* Read up to AMOUNT bytes at the underlying address ADDR from the storage
- into BUF and LEN. INDEX varies from 0 to the number of runs in STORE. */
+ into BUF and LEN. INDEX varies from 0 to the number of runs in STORE. */
store_read_meth_t read;
/* Write up to LEN bytes from BUF to the storage at the underlying address
- ADDR. INDEX varies from 0 to the number of runs in STORE. */
+ ADDR. INDEX varies from 0 to the number of runs in STORE. */
store_write_meth_t write;
+ /* Set store's size to NEWSIZE (in bytes). */
+ store_set_size_meth_t set_size;
/* To the lengths of each for the four arrays in ENC, add how much STORE
would need to be encoded. */
@@ -305,6 +309,9 @@ error_t store_write (struct store *store,
error_t store_read (struct store *store,
store_offset_t addr, size_t amount, void **buf, size_t *len);
+/* Set STORE's size to NEWSIZE (in bytes). */
+error_t store_set_size (struct store *store, size_t newsize);
+
/* If STORE was created using store_create, remove the reference to the
source from which it was created. */
void store_close_source (struct store *store);