diff options
author | Roland McGrath <roland@gnu.org> | 1999-01-27 20:46:47 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1999-01-27 20:46:47 +0000 |
commit | 8e8f1f026b493aeea075d4f1cbc05bbf0dd6cec6 (patch) | |
tree | fe387c55550994e63545bb880b143bc6e2f4661d /storeio/pager.c | |
parent | 917384c096a24625c84ab8901901a45e2f2f055f (diff) | |
download | hurd-8e8f1f026b493aeea075d4f1cbc05bbf0dd6cec6.tar.gz hurd-8e8f1f026b493aeea075d4f1cbc05bbf0dd6cec6.tar.bz2 hurd-8e8f1f026b493aeea075d4f1cbc05bbf0dd6cec6.zip |
1999-01-27 Roland McGrath <roland@baalperazim.frob.com>
* 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.
Diffstat (limited to 'storeio/pager.c')
-rw-r--r-- | storeio/pager.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storeio/pager.c b/storeio/pager.c index 28b5a4e0..e85104c5 100644 --- a/storeio/pager.c +++ b/storeio/pager.c @@ -1,6 +1,6 @@ /* Paging interface for storeio devices - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 96, 97, 99 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -217,7 +217,7 @@ dev_get_memory_object (struct dev *dev, vm_prot_t prot, memory_object_t *memobj) { error_t err = store_map (dev->store, prot, memobj); - if (err == EOPNOTSUPP) + if (err == EOPNOTSUPP && !dev->inhibit_cache) { int created = 0; |