aboutsummaryrefslogtreecommitdiff
path: root/storeio/storeio.c
Commit message (Collapse)AuthorAgeFilesLines
* 2002-06-22 Roland McGrath <roland@frob.com>Roland McGrath2002-06-221-2/+2
| | | | | * storeio.c (parse_opt): Fix fencepost error in -n arg parsing. Reported by Nicola Girardi <nicola@g-n-u.de>.
* 2001-12-28 Roland McGrath <roland@frob.com>Roland McGrath2002-01-021-0/+6
| | | | | | | | * dev.h (struct dev): New member `no_fileio' (flag). * storeio.c (options): Add --no-file-io/-F. (parse_opt): Parse it to set PARAMS->dev->no_fileio. (trivfs_append_args): Add --no-file-io if it's set. * dev.c (dev_open): Pass STORE_NOFILEIO flag if DEV->no_fileio is set.
* 2001-08-12 Neal H Walfield <neal@cs.uml.edu>Roland McGrath2001-08-151-2/+2
| | | | | | | | * pager.c: Include <errno.h>. (pager_read_page): Use memset, not bzero. * storeio.c (check_open_hook): Typo fix in comment. (trivfs_modify_stat): STORE->size is a store_offset_t. It not a vm_size_t.
* 2001-02-18 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2001-04-191-4/+20
| | | | | | | | | | * dev.h (struct dev): New member nperopens. * storeio.c (open_hook): Hold device lock and check if this is the first open. If yes, activate the store. (close_hook): Hold global_lock and check if this was the last open. If yes, inactivate the store. * dev.c (dev_open): Open the store with STORE_INACTIVE (in store_parsed_open as well as in store_create).
* 2001-01-16 Roland McGrath <roland@frob.com>Roland McGrath2001-01-161-5/+8
| | | | | | | | | * storeio.c (parse_opt): Set PARAMS->store_params.store_optional. (storeio_fsys): New global variable. (main): Use it. * dev.h: Declare it. * dev.c (dev_open): If DEV->store_name is null, open the underlying node using store_create.
* 2000-03-19 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath2000-03-191-62/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * dev.h (struct dev): New members store_name, readonly, rdev. (dev_is_readonly): New inline function. * dev.c (dev_open): Take just one arg, a struct dev whose store==0. (dev_close): Shut down the store, but leave DEV intact with store==0. * storeio.c (struct storeio_argp_params): New type. (device, device_lock, store_name): Variables removed. (readonly, inhibit_cache, enforce_store, rdev): Likewise. These are all now members in struct storeio_argp_params or struct dev; rdev now uses dev_t instead of int. (parse_opt): Find a struct storeio_argp_params in STATE->input and fill it in accordingly. Use makedev macro to construct rdev. (trivfs_append_args): Find options in struct dev off control hook. Use major, minor macros. (main): Make DEVICE a local here, and point FSYS->hook at it. Don't modify trivfs_allow_open. (getroot_hook): New static function. (trivfs_getroot_hook): New variable, initialized to that. (check_open_hook): Find struct dev in CNTL->hook and use new dev_open interface. Use dev_is_readonly. (open_hook): Find struct dev in PEROPEN->cntl->hook and check DEV->store. (trivfs_modify_stat): Find struct dev in CRED->po->cntl->hook. Use dev_is_readonly. (trivfs_goaway): Find struct dev in FSYS->hook and use its lock. (trivfs_S_fsys_syncfs): Find struct dev in CNTL->hook.
* 1999-11-24 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-11-251-1/+1
| | | | | * storeio.c (trivfs_modify_stat): Clear writable bits if open store is readonly, not just if we got the --readonly switch.
* 1999-11-14 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-11-181-4/+10
| | | | | | | | | | | | * storeio.c (check_open_hook): Don't check for D_NO_SUCH_DEVICE here. Translation to ENXIO now done in libstore. * dev.h (struct dev): New member `enforced'. * storeio.c (enforce_store): New variable. (options, parse_opt, trivfs_append_args): Grok new option --enforced/-e to set enforce_store. (check_open_hook): Set DEVICE->enforced from enforce_store. * io.c (trivfs_S_file_get_storage_info): If DEV->enforced is set and the store flags lack STORE_ENFORCED, then return STORAGE_OTHER.
* 1999-05-23 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-05-231-2/+6
| | | | * storeio.c (check_open_hook): Translate D_NO_SUCH_DEVICE to ENXIO.
* 1999-04-30 Mark Kettenis <kettenis@gnu.org>Roland McGrath1999-05-011-4/+7
| | | | | | * storeio.c (trivfs_modify_stat): Do not assume that we have the device open in the caculation of st_mode. If the device is not open, only return S_IFCHR if inhibit_cache is set.
* 1999-01-31 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-02-011-1/+3
| | | | * storeio.c (trivfs_modify_stat): Return S_IFCHR if block size is 1.
* 1999-01-31 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-02-011-1/+1
| | | | | | * storeio.c (trivfs_modify_stat): Return S_IFCHR iff inhibit_cache set, otherwsie S_IFBLK. For a block-addressed device, S_IFCHR means "must do whole-block i/o".
* 1999-01-27 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-01-271-6/+16
| | | | | | | | | | | | | | | | * storeio.c (options): New option -c/--no-cache. (inhibit_cache): New variable. (parse_opt): Make -c set it. (trivfs_append_args): Report --no-cache if set. (check_open_hook): Pass inhibit_cache flag to dev_open. * dev.h (struct dev): New member `inhibit_cache'. (dev_open): Update decl. * dev.c (dev_open): Take new arg inhibit_cache, store in new dev. If set, don't initialize buf_offs, io_lock, pager, pager_lock. (dev_read, dev_write): If DEV->inhibit_cache is set, allow only whole-block i/o: EINVAL for non-whole-block attempts. * pager.c (dev_get_memory_object): If DEV->inhibit_cache is set, don't make our own pager; if store_map returns EOPNOTSUPP, so do we.
* 1998-07-20 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1998-07-201-6/+7
| | | | * storeio.c (main): Fix return type to int, and use return.
* Wed Aug 20 14:07:05 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1997-08-201-1/+1
| | | | | | * pager.c (service_paging_requests): New args for ports_manage_port_operations_multithread. * storeio.c (main): Likewise.
* (parse_opt):Miles Bader1997-02-201-66/+48
| | | | | | | | | | | | | | | | | New function (was nested in main). (doc): Make an initialized array. (fsys_port_class, root_port_class, port_bucket, trivfs_protid_portclasses, trivfs_protid_nportclasses, trivfs_cntl_portclasses, trivfs_cntl_nportclasses): Variables removed. (argp, argp_kids): New variables (were nested in main). (main): Don't set or use port class/bucket variables, let trivfs_startup do it. Add FSYS variable. (trivfs_goaway): Get ROOT_PORT_CLASS from FSYS.
* Fri Nov 15 17:54:10 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1996-11-181-5/+3
| | | | | * storeio.c (trivfs_check_open_hook): New arg syntax. (check_open_hook): Likewise.
* (main):Miles Bader1996-10-241-1/+1
| | | | Use elements of type `struct argp_child' for KIDS.
* (trivfs_S_file_check_access):Miles Bader1996-09-261-12/+0
| | | | Function removed (trivfs default is now sufficient).
* (check_open_hook):Miles Bader1996-09-241-0/+15
| | | | | | Return EROFS if O_WRITE on a readonly device. (trivfs_S_file_check_access): New function.
* (trivfs_append_args):Miles Bader1996-09-231-2/+3
| | | | | | | Make ARGZ_LEN of type `size_t *'. Narrow scope of BUF. <argz.h>: New include.
* (main):Miles Bader1996-09-231-2/+26
| | | | | | Use STORE_PARAMS variable to get result from parsing STORE_ARGP. (trivfs_append_args): New function.
* (argp_program_version): New variable.Miles Bader1996-09-141-6/+7
| | | | <version.h>: New include.
* Initial checkinMiles Bader1996-09-081-0/+328