diff options
author | Roland McGrath <roland@gnu.org> | 1999-09-13 06:35:11 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1999-09-13 06:35:11 +0000 |
commit | 2a061ebb71bf7a93d5e7ed71fa13dd7005745965 (patch) | |
tree | c03dbbcdb1ab820ed98049bf3ad866ca4125ae2c | |
parent | d5192f3ae0bc49683b16882e47d1bc39607d5363 (diff) |
Reverted changes related to io_map_segment.
40 files changed, 163 insertions, 265 deletions
diff --git a/boot/ChangeLog b/boot/ChangeLog index 50fb864a..ddafdd82 100644 --- a/boot/ChangeLog +++ b/boot/ChangeLog @@ -1,3 +1,7 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * boot.c: Reverted changes related to io_map_segment. + 1999-09-07 Thomas Bushnell, BSG <tb@mit.edu> * boot.c (S_io_map_segment): New function. diff --git a/boot/boot.c b/boot/boot.c index 4c07e82a..859dae25 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -1756,19 +1756,6 @@ S_io_map (mach_port_t obj, } kern_return_t -S_io_map_segment (mach_port_t obj, - mach_port_t reply_port, - mach_msg_type_name_t reply_type, - int index, - mach_port_t *rd, - mach_msg_type_name_t *rdtype, - mach_port_t *wr, - mach_msg_type_name_t *wrtype) -{ - return EOPNOTSUPP; -} - -kern_return_t S_io_map_cntl (mach_port_t obj, mach_port_t reply_port, mach_msg_type_name_t reply_type, diff --git a/ext2fs/ChangeLog b/ext2fs/ChangeLog index 21f4081f..70b623b7 100644 --- a/ext2fs/ChangeLog +++ b/ext2fs/ChangeLog @@ -1,3 +1,8 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * dir.c, truncate.c, pager.c: Reverted changes related to + io_map_segment. + 1999-09-09 Roland McGrath <roland@baalperazim.frob.com> * Makefile (makemode): server -> servers. diff --git a/ext2fs/dir.c b/ext2fs/dir.c index 61ca3f0f..84f772a0 100644 --- a/ext2fs/dir.c +++ b/ext2fs/dir.c @@ -152,7 +152,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, ds->stat = LOOKING; /* Map in the directory contents. */ - memobj = diskfs_get_filemap (dp, 0, prot); + memobj = diskfs_get_filemap (dp, prot); if (memobj == MACH_PORT_NULL) return errno; @@ -721,7 +721,7 @@ diskfs_dirempty (struct node *dp, struct protid *cred) vm_address_t buf = 0, curoff; struct ext2_dir_entry_2 *entry; int hit = 0; /* Found something in the directory. */ - memory_object_t memobj = diskfs_get_filemap (dp, 0, VM_PROT_READ); + memory_object_t memobj = diskfs_get_filemap (dp, VM_PROT_READ); if (memobj == MACH_PORT_NULL) /* XXX should reflect error properly. */ diff --git a/ext2fs/pager.c b/ext2fs/pager.c index 270bbd9a..8981390e 100644 --- a/ext2fs/pager.c +++ b/ext2fs/pager.c @@ -777,12 +777,10 @@ create_disk_pager (void) /* Call this to create a FILE_DATA pager and return a send right. NODE must be locked. */ mach_port_t -diskfs_get_filemap (struct node *node, int index, vm_prot_t prot) +diskfs_get_filemap (struct node *node, vm_prot_t prot) { mach_port_t right; - assert (index == 0); /* XXX */ - assert (S_ISDIR (node->dn_stat.st_mode) || S_ISREG (node->dn_stat.st_mode) || (S_ISLNK (node->dn_stat.st_mode))); diff --git a/ext2fs/truncate.c b/ext2fs/truncate.c index 8113f9bf..5c8e0829 100644 --- a/ext2fs/truncate.c +++ b/ext2fs/truncate.c @@ -232,7 +232,7 @@ force_delayed_copies (struct node *node, off_t length) mach_port_t obj; pager_change_attributes (pager, MAY_CACHE, MEMORY_OBJECT_COPY_NONE, 1); - obj = diskfs_get_filemap (node, 0, VM_PROT_READ); + obj = diskfs_get_filemap (node, VM_PROT_READ); if (obj != MACH_PORT_NULL) { /* XXX should cope with errors from diskfs_get_filemap */ diff --git a/hurd/ChangeLog b/hurd/ChangeLog index 39f4dc71..72cedf64 100644 --- a/hurd/ChangeLog +++ b/hurd/ChangeLog @@ -1,3 +1,7 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * io.defs: Reverted changes related to io_map_segment. + 1999-09-07 Thomas Bushnell, BSG <tb@mit.edu> * io.defs (io_map_segment): New RPC. @@ -5,7 +9,7 @@ (io_map_cntl, io_get_conch, io_release_conch, io_prenotify, io_eofnotify, io_postnotify, io_readnotify, io_readsleep, io_sigio): Label as deprecated. - + Tue May 11 13:38:50 1999 Thomas Bushnell, BSG <tb@mit.edu> * startup.defs: Doc fixes. diff --git a/hurd/io.defs b/hurd/io.defs index 92ce0fa2..75a8f58b 100644 --- a/hurd/io.defs +++ b/hurd/io.defs @@ -205,7 +205,14 @@ routine io_server_version ( /* Definitions for mapped io */ -/* This RPC is a deprecated alias for io_map_segment with an INDEX of zero. */ +/* Return objects mapping the data underlying this memory object. If + the object can be read then memobjrd will be provided; if the + object can be written then memobjwr will be provided. For objects + where read data and write data are the same, these objects will be + equal, otherwise they will be disjoint. Servers are permitted to + implement io_map but not io_map_cntl. Some objects do not provide + mapping; they will set none of the ports and return an error. Such + objects can still be accessed by io_read and io_write. */ routine io_map ( io_object: io_t; RPT @@ -220,7 +227,6 @@ routine io_map ( This call may be unimplemented by some servers; they will return EOPNOTSUPP. */ -/* This call is deprecated. */ routine io_map_cntl ( io_object: io_t; RPT @@ -230,7 +236,6 @@ routine io_map_cntl ( should call this function. The server will endeavor to have USER_HAS_CONCH when this returns, but users should call io_get_it in a loop for safety. */ -/* This call is deprecated. */ routine io_get_conch ( io_object: io_t RPTLAST); @@ -243,7 +248,6 @@ routine io_get_conch ( to be updated, the user should call io_release_conch. Upon return, the conch status might be either USER_COULD_HAVE_CONCH or USER_HAS_NOT_CONCH. */ -/* This call is deprecated. */ routine io_release_conch ( io_object: io_t RPTLAST); @@ -253,7 +257,6 @@ routine io_release_conch ( example, to clear the eof condition after it is read once. The routine should be called while the user has the conch. The user will keep it upon return. */ -/* This call is deprecated. */ routine io_eofnotify ( io_object: io_t RPTLAST); @@ -263,7 +266,6 @@ routine io_eofnotify ( size will now permit the write, so it should be re-checked. The routine should be called while the user has the conch. The user will keep it upon return. */ -/* This call is deprecated. */ routine io_prenotify ( io_object: io_t; RPT @@ -274,7 +276,6 @@ routine io_prenotify ( user needs to call io_postnotify. The routine should be called while the user has the conch. The user will keep it upon return. */ -/* This call is deprecated. */ routine io_postnotify ( io_object: io_t; RPT @@ -284,20 +285,17 @@ routine io_postnotify ( /* After moving rd_file_pointer past readnotify_size, the user should call this routine, while holding the conch. The user will keep the conch upon return. */ -/* This call is deprecated. */ routine io_readnotify ( io_object: io_t RPTLAST); /* This routine sleeps until the read_size is increased. The routine should be called while the user has the conch. The user will keep it upon return. */ -/* This call is deprecated. */ routine io_readsleep ( io_object: io_t RPTLAST); /* The shared user has just done some IO, and a signal needs to be sent for async users. */ -/* This call is deprecated. */ routine io_sigio ( io_object: io_t RPTLAST); @@ -325,20 +323,3 @@ routine io_identity ( routine io_revoke ( io_object: io_t RPTLAST); -/* Return objects mapping a portion of the data underlying this memory - object. Objects in size through 2^64 are supported. Each is divided - into 2^32 segments, each of which is 2^32 bytes long. INDEX selects - the segment in question (the high 32 bits). - - If the object can be read then memobjrd will be provided; if the - object can be written then memobjwr will be provided. For objects - where read data and write data are the same, these objects will be - equal, otherwise they will be disjoint. Some objects do not - provide mapping; they will set none of the ports and return an - error. Such objects can still be accessed by io_read and io_write. */ -routine io_map_segment ( - io_object: io_t; - RPT - index: int; - out memobjrd: mach_port_send_t; - out memobjwt: mach_port_send_t); diff --git a/isofs/ChangeLog b/isofs/ChangeLog index 69ff1336..fa28acec 100644 --- a/isofs/ChangeLog +++ b/isofs/ChangeLog @@ -1,3 +1,7 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * pager.c: Reverted changes related to io_map_segment. + 1999-09-07 Thomas Bushnell, BSG <tb@mit.edu> * pager.c (diskfs_get_filemap): Accept additional parameter. @@ -5,7 +9,7 @@ 1999-07-10 Roland McGrath <roland@baalperazim.frob.com> * isofs.h: Add #include <sys/mman.h> for munmap decl. - + 1999-07-09 Thomas Bushnell, BSG <tb@mit.edu> * lookup.c (diskfs_get_directs): Use mmap instead of vm_allocate. diff --git a/isofs/pager.c b/isofs/pager.c index 7f163daf..7e12ebc0 100644 --- a/isofs/pager.c +++ b/isofs/pager.c @@ -147,12 +147,10 @@ diskfs_file_update (struct node *np, /* Create a FILE_DATA pager for the specified node */ mach_port_t -diskfs_get_filemap (struct node *np, int index, vm_prot_t prot) +diskfs_get_filemap (struct node *np, vm_prot_t prot) { struct user_pager_info *upi; mach_port_t right; - - assert (index == 0); /* XXX */ assert (S_ISDIR (np->dn_stat.st_mode) || S_ISREG (np->dn_stat.st_mode) diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index fecf02e2..77d0bc0b 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,8 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * Makefile, rdwr-internal.c, io-map.c, io-map-segment.c, diskfs.h: + Reverted changes related to io_map_segment. + 1999-09-09 Thomas Bushnell, BSG <tb@mit.edu> * io-pathconf.c: Include <unistd.h>. diff --git a/libdiskfs/Makefile b/libdiskfs/Makefile index a4637657..612aaea2 100644 --- a/libdiskfs/Makefile +++ b/libdiskfs/Makefile @@ -32,8 +32,7 @@ IOSRCS= io-async-icky.c io-async.c io-duplicate.c io-get-conch.c io-revoke.c \ io-modes-on.c io-modes-set.c io-owner-mod.c io-owner-get.c \ io-pathconf.c io-prenotify.c io-read.c io-readable.c io-identity.c \ io-reauthenticate.c io-rel-conch.c io-restrict-auth.c io-seek.c \ - io-select.c io-stat.c io-stubs.c io-write.c io-version.c io-sigio.c \ - io-map-segment.c + io-select.c io-stat.c io-stubs.c io-write.c io-version.c io-sigio.c FSYSSRCS=fsys-getroot.c fsys-goaway.c fsys-startup.c fsys-getfile.c \ fsys-options.c fsys-syncfs.c fsys-forward.c IFSOCKSRCS=ifsock.c diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 499bfd5b..73c55faf 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -486,11 +486,10 @@ void diskfs_sync_everything (int wait); irreversable. */ void diskfs_shutdown_pager (); -/* The user must define this function. Return a memory object port - (send right) for the INDEX'th 2^32 byte segment of the contents of - NP. PROT is the maximum allowable access. On errors, return - MACH_PORT_NULL and set errno. */ -mach_port_t diskfs_get_filemap (struct node *np, int index, vm_prot_t prot); +/* The user must define this function. Return a memory object port (send + right) for the file contents of NP. PROT is the maximum allowable + access. On errors, return MACH_PORT_NULL and set errno. */ +mach_port_t diskfs_get_filemap (struct node *np, vm_prot_t prot); /* The user must define this function. Return true if there are pager ports exported that might be in use by users. If this returns false, then diff --git a/libdiskfs/io-map-segment.c b/libdiskfs/io-map-segment.c deleted file mode 100644 index 4245602d..00000000 --- a/libdiskfs/io-map-segment.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 1999 Free Software Foundation, Inc. - Written by Thomas Bushnell, BSG. - - This file is part of the GNU Hurd. - - The GNU Hurd is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2, or (at - your option) any later version. - - The GNU Hurd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ - -#include <fcntl.h> - -#include "priv.h" -#include "io_S.h" - -/* Implement io_map as described in <hurd/io.defs>. */ -kern_return_t -diskfs_S_io_map_segment (struct protid *cred, - int index, - memory_object_t *rdobj, - mach_msg_type_name_t *rdtype, - memory_object_t *wrobj, - mach_msg_type_name_t *wrtype) -{ - int flags; - struct node *node; - - if (!cred) - return EOPNOTSUPP; - - *wrobj = *rdobj = MACH_PORT_NULL; - - node = cred->po->np; - flags = cred->po->openstat & (O_READ | O_WRITE); - - mutex_lock (&node->lock); - switch (flags) - { - case O_READ | O_WRITE: - *wrobj = *rdobj = diskfs_get_filemap (node, index, - VM_PROT_READ |VM_PROT_WRITE); - if (*wrobj == MACH_PORT_NULL) - goto error; - mach_port_mod_refs (mach_task_self (), *rdobj, MACH_PORT_RIGHT_SEND, 1); - break; - case O_READ: - *rdobj = diskfs_get_filemap (node, index, VM_PROT_READ); - if (*rdobj == MACH_PORT_NULL) - goto error; - break; - case O_WRITE: - *wrobj = diskfs_get_filemap (node, index, VM_PROT_WRITE); - if (*wrobj == MACH_PORT_NULL) - goto error; - break; - } - mutex_unlock (&node->lock); - - *rdtype = MACH_MSG_TYPE_MOVE_SEND; - *wrtype = MACH_MSG_TYPE_MOVE_SEND; - - return 0; - -error: - mutex_unlock (&node->lock); - return errno; -} - diff --git a/libdiskfs/io-map.c b/libdiskfs/io-map.c index acd8adc6..6268f2c5 100644 --- a/libdiskfs/io-map.c +++ b/libdiskfs/io-map.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994, 1997, 1999 Free Software Foundation + Copyright (C) 1994, 1997 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -28,6 +28,46 @@ diskfs_S_io_map (struct protid *cred, memory_object_t *wrobj, mach_msg_type_name_t *wrtype) { - return diskfs_S_io_map_segment (cred, 0, rdobj, rdtype, wrobj, wrtype); + int flags; + struct node *node; + + if (!cred) + return EOPNOTSUPP; + + *wrobj = *rdobj = MACH_PORT_NULL; + + node = cred->po->np; + flags = cred->po->openstat & (O_READ | O_WRITE); + + mutex_lock (&node->lock); + switch (flags) + { + case O_READ | O_WRITE: + *wrobj = *rdobj = diskfs_get_filemap (node, VM_PROT_READ |VM_PROT_WRITE); + if (*wrobj == MACH_PORT_NULL) + goto error; + mach_port_mod_refs (mach_task_self (), *rdobj, MACH_PORT_RIGHT_SEND, 1); + break; + case O_READ: + *rdobj = diskfs_get_filemap (node, VM_PROT_READ); + if (*rdobj == MACH_PORT_NULL) + goto error; + break; + case O_WRITE: + *wrobj = diskfs_get_filemap (node, VM_PROT_WRITE); + if (*wrobj == MACH_PORT_NULL) + goto error; + break; + } + mutex_unlock (&node->lock); + + *rdtype = MACH_MSG_TYPE_MOVE_SEND; + *wrtype = MACH_MSG_TYPE_MOVE_SEND; + + return 0; + +error: + mutex_unlock (&node->lock); + return errno; } diff --git a/libdiskfs/rdwr-internal.c b/libdiskfs/rdwr-internal.c index 4c765aaa..046467a3 100644 --- a/libdiskfs/rdwr-internal.c +++ b/libdiskfs/rdwr-internal.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994, 1995, 1996, 1997, 1999 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -49,7 +49,7 @@ _diskfs_rdwr_internal (struct node *np, np->dn_set_atime = 1; } - memobj = diskfs_get_filemap (np, 0, prot); + memobj = diskfs_get_filemap (np, prot); if (memobj == MACH_PORT_NULL) return errno; diff --git a/libnetfs/ChangeLog b/libnetfs/ChangeLog index 49845de5..edf2fec8 100644 --- a/libnetfs/ChangeLog +++ b/libnetfs/ChangeLog @@ -1,3 +1,7 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * iostubs.c: Reverted changes related to io_map_segment. + 1999-09-09 Thomas Bushnell, BSG <tb@mit.edu> * fsstubs.c (netfs_S_io_pathconf): Delete function. diff --git a/libnetfs/iostubs.c b/libnetfs/iostubs.c index b07c947d..1465b43a 100644 --- a/libnetfs/iostubs.c +++ b/libnetfs/iostubs.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995, 1999 Free Software Foundation, Inc. + Copyright (C) 1995 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -31,14 +31,6 @@ netfs_S_io_map (struct protid *user, } error_t -netfs_S_io_map_segment (struct protid *user, int index, - mach_port_t *rdobj, mach_msg_type_name_t *rdobjtype, - mach_port_t *wrobj, mach_msg_type_name_t *wrobjtype) -{ - return EOPNOTSUPP; -} - -error_t netfs_S_io_map_cntl (struct protid *user, mach_port_t *obj, mach_msg_type_name_t *objtype) @@ -95,4 +87,3 @@ netfs_S_io_sigio (struct protid *user) { return EOPNOTSUPP; } - diff --git a/libtreefs/s-io.c b/libtreefs/s-io.c index 3702ee25..6fdc504a 100644 --- a/libtreefs/s-io.c +++ b/libtreefs/s-io.c @@ -1,6 +1,6 @@ /* io_t rpc stubs; see <hurd/io.defs> for more info - Copyright (C) 1995, 1999 Free Software Foundation, Inc. + Copyright (C) 1995 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -85,14 +85,6 @@ treefs_S_io_map (struct treefs_protid *cred, memory_object_t *rdobj, mach_msg_type_name_t *rd_type, memory_object_t *wrobj, mach_msg_type_name_t *wr_type) { - return treefs_S_io_map_segment (cred, 0, rdobj, rd_type, wrobj, wr_type); -} - -error_t -treefs_S_io_map_segment (struct treefs_protid *cred, ind index, - memory_object_t *rdobj, mach_msg_type_name_t *rd_type, - memory_object_t *wrobj, mach_msg_type_name_t *wr_type) -{ if (!cred) return EOPNOTSUPP; return treefs_s_io_map (cred, rdobj, rd_type, wrobj, wr_type); diff --git a/libtreefs/treefs-s-hooks.h b/libtreefs/treefs-s-hooks.h index 4039e660..2ea9e7ab 100644 --- a/libtreefs/treefs-s-hooks.h +++ b/libtreefs/treefs-s-hooks.h @@ -1,6 +1,6 @@ /* RPC server hooks in libtreefs (also see "treefs-hooks.h") - Copyright (C) 1995, 1999 Free Software Foundation, Inc. + Copyright (C) 1995 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -133,9 +133,9 @@ DHH(s_io_duplicate, error_t, mach_port_t *, mach_msg_type_name_t *) DHH(s_io_server_version, error_t, char *, int *, int *, int *) #define treefs_s_io_server_version(h, args...) \ _TREEFS_CHH(h, S_IO_SERVER_VERSION, s_io_server_version , ##args) -DHH(s_io_map_segment, error_t, int, mach_port_t *, mach_msg_type_name_t *, mach_port_t *, mach_msg_type_name_t *) -#define treefs_s_io_map_segment(h, args...) \ - _TREEFS_CHH(h, S_IO_MAP_SEGMENT, s_io_map_segment , ##args) +DHH(s_io_map, error_t, mach_port_t *, mach_msg_type_name_t *, mach_port_t *, mach_msg_type_name_t *) +#define treefs_s_io_map(h, args...) \ + _TREEFS_CHH(h, S_IO_MAP, s_io_map , ##args) DHH(s_io_map_cntl, error_t, mach_port_t *, mach_msg_type_name_t *) #define treefs_s_io_map_cntl(h, args...) \ _TREEFS_CHH(h, S_IO_MAP_CNTL, s_io_map_cntl , ##args) diff --git a/libtrivfs/ChangeLog b/libtrivfs/ChangeLog index 3ab17d40..f1e714bc 100644 --- a/libtrivfs/ChangeLog +++ b/libtrivfs/ChangeLog @@ -1,3 +1,8 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * Makefile, io-map.c, io-map-segment.c: Reverted changes related to + io_map_segment. + 1999-09-07 Thomas Bushnell, BSG <tb@mit.edu> * io-map-segment.c (trivfs_S_io_map): New file. @@ -11,7 +16,7 @@ Mon Mar 15 14:36:33 1999 Thomas Bushnell, BSG <tb@mit.edu> the proper value. (trivfs_begin_using_control): Likewise. Reported by Mark Kettenis (kettenis@wins.uva.nl). - + 1999-02-06 Mark Kettenis <kettenis@gnu.org> * trivfs.h (trivfs_check_access_hook): New variable. diff --git a/libtrivfs/Makefile b/libtrivfs/Makefile index 940496dd..58322c15 100644 --- a/libtrivfs/Makefile +++ b/libtrivfs/Makefile @@ -31,8 +31,7 @@ IOSRCS=io-async-icky.c io-async.c io-duplicate.c io-map.c io-modes-get.c \ io-modes-off.c io-modes-on.c io-modes-set.c io-owner-get.c \ io-owner-mod.c io-pathconf.c io-read.c io-readable.c io-revoke.c \ io-reauthenticate.c io-restrict-auth.c io-seek.c io-select.c \ - io-stat.c io-stubs.c io-write.c io-version.c io-identity.c \ - io-map-segment.c + io-stat.c io-stubs.c io-write.c io-version.c io-identity.c FSYSSRCS=fsys-getroot.c fsys-goaway.c fsys-stubs.c fsys-syncfs.c \ fsys-forward.c fsys-set-options.c fsys-get-options.c diff --git a/libtrivfs/io-map-segment.c b/libtrivfs/io-map-segment.c deleted file mode 100644 index 9386aca2..00000000 --- a/libtrivfs/io-map-segment.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 1999 Free Software Foundation, Inc. - Written by Thomas Bushnell, BSG. - - This file is part of the GNU Hurd. - - The GNU Hurd is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2, or (at - your option) any later version. - - The GNU Hurd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ - -#include "priv.h" -#include "io_S.h" -#include <assert.h> - -kern_return_t -trivfs_S_io_map_segment (struct trivfs_protid *cred, - mach_port_t reply, - mach_msg_type_name_t replytype, - int index, - mach_port_t *rdobj, - mach_msg_type_name_t *rdtype, - mach_port_t *wrobj, - mach_msg_type_name_t *wrtype) -{ - assert (!trivfs_support_read && !trivfs_support_write); - return EOPNOTSUPP; -} diff --git a/libtrivfs/io-map.c b/libtrivfs/io-map.c index 958b53cf..f94bf8a5 100644 --- a/libtrivfs/io-map.c +++ b/libtrivfs/io-map.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1993, 1994, 1999 Free Software Foundation + Copyright (C) 1993, 1994 Free Software Foundation This file is part of the GNU Hurd. @@ -32,6 +32,6 @@ trivfs_S_io_map (struct trivfs_protid *cred, mach_port_t *wrobj, mach_msg_type_name_t *wrtype) { - return trivfs_S_io_map_segment (cred, 0, reply, replytype, - rdobj, rdtype, wrobj, wrtype); + assert (!trivfs_support_read && !trivfs_support_write); + return EOPNOTSUPP; } diff --git a/pfinet/ChangeLog b/pfinet/ChangeLog index 05606bc2..f7f97be4 100644 --- a/pfinet/ChangeLog +++ b/pfinet/ChangeLog @@ -1,7 +1,11 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * io-ops.c: Reverted changes related to io_map_segment. + 1999-09-09 Thomas Bushnell, BSG <tb@mit.edu> * ethernet.c (ethernet_open): Don't start the input work thread - here. + here. (more_packets, mark_bh, input_work_thread): Move these to ... * devices.c: ... here. @@ -11,7 +15,7 @@ * devices.c (add_device): Remove unused function. * pfinet.h (incoming_net_packet): Remove unused declaration. - + 1999-09-07 Thomas Bushnell, BSG <tb@mit.edu> * io-ops.c (S_io_map_segment): New function. diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c index 1a75b6e3..b6831c31 100644 --- a/pfinet/io-ops.c +++ b/pfinet/io-ops.c @@ -580,17 +580,6 @@ S_io_map (struct sock_user *user, } error_t -S_io_map_segment (struct sock_user *user, - int index, - mach_port_t *rdobj, - mach_msg_type_name_t *rdobj_type, - mach_port_t *wrobj, - mach_msg_type_name_t *wrobj_type) -{ - return EOPNOTSUPP; -} - -error_t S_io_map_cntl (struct sock_user *user, mach_port_t *obj, mach_msg_type_name_t *obj_type) diff --git a/pflocal/ChangeLog b/pflocal/ChangeLog index fe20a8ea..c7c36fc0 100644 --- a/pflocal/ChangeLog +++ b/pflocal/ChangeLog @@ -1,3 +1,7 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * io.c: Reverted changes related to io_map_segment. + 1999-09-07 Thomas Bushnell, BSG <tb@mit.edu> * io.c (S_io_map_segment): New function. diff --git a/pflocal/io.c b/pflocal/io.c index e875d4a2..133c75c9 100644 --- a/pflocal/io.c +++ b/pflocal/io.c @@ -559,14 +559,6 @@ S_io_map (struct sock_user *user, } error_t -S_io_map_segment (struct sock_user *user, int index, - mach_port_t *memobj_rd, mach_msg_type_name_t *memobj_rd_type, - mach_port_t *memobj_wt, mach_msg_type_name_t *memobj_wt_type) -{ - return EOPNOTSUPP; -} - -error_t S_io_map_cntl (struct sock_user *user, mach_port_t *mem, mach_msg_type_name_t *mem_type) { diff --git a/storeio/ChangeLog b/storeio/ChangeLog index be4eab62..14a134d1 100644 --- a/storeio/ChangeLog +++ b/storeio/ChangeLog @@ -1,3 +1,7 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * io.c: Reverted changes related to io_map_segment. + 1999-09-07 Thomas Bushnell, BSG <tb@mit.edu> * io.c (trivfs_S_io_map): Renamed to ... diff --git a/storeio/io.c b/storeio/io.c index 6acaa205..f3a6a732 100644 --- a/storeio/io.c +++ b/storeio/io.c @@ -34,13 +34,11 @@ mapping; they will set none of the ports and return an error. Such objects can still be accessed by io_read and io_write. */ error_t -trivfs_S_io_map_segment (struct trivfs_protid *cred, int index, +trivfs_S_io_map (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t reply_type, memory_object_t *rd_obj, mach_msg_type_name_t *rd_type, memory_object_t *wr_obj, mach_msg_type_name_t *wr_type) { - assert (index == 0); /* XXX */ - if (! cred) return EOPNOTSUPP; else if (! (cred->po->openmodes & (O_READ|O_WRITE))) diff --git a/term/ChangeLog b/term/ChangeLog index 868b1e8f..ee182dfa 100644 --- a/term/ChangeLog +++ b/term/ChangeLog @@ -1,3 +1,7 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * users.c: Reverted changes related to io_map_segment. + 1999-09-07 Thomas Bushnell, BSG <tb@mit.edu> * users.c (trivfs_S_io_map): Renamed to ... diff --git a/term/users.c b/term/users.c index e8054a01..60b7825f 100644 --- a/term/users.c +++ b/term/users.c @@ -2035,12 +2035,11 @@ trivfs_S_io_select (struct trivfs_protid *cred, } kern_return_t -trivfs_S_io_map_segment (struct trivfs_protid *cred, - int index, - mach_port_t *rdobj, - mach_msg_type_name_t *rdtype, - mach_port_t *wrobj, - mach_msg_type_name_t *wrtype) +trivfs_S_io_map (struct trivfs_protid *cred, + mach_port_t *rdobj, + mach_msg_type_name_t *rdtype, + mach_port_t *wrobj, + mach_msg_type_name_t *wrtype) { return EOPNOTSUPP; } diff --git a/trans/ChangeLog b/trans/ChangeLog index e719385a..15d6dfcb 100644 --- a/trans/ChangeLog +++ b/trans/ChangeLog @@ -1,3 +1,8 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * fifo.c, null.c, new-fifo.c: Reverted changes related to + io_map_segment. + 1999-09-07 Thomas Bushnell, BSG <tb@mit.edu> * null.c (trivfs_S_io_map): Renamed to ... diff --git a/trans/fifo.c b/trans/fifo.c index 61046510..3b62cc21 100644 --- a/trans/fifo.c +++ b/trans/fifo.c @@ -1,6 +1,6 @@ /* A translator for fifos - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -317,12 +317,11 @@ trivfs_goaway (struct trivfs_control *cntl, int flags) mapping; they will set none of the ports and return an error. Such objects can still be accessed by io_read and io_write. */ error_t -trivfs_S_io_map_segment(struct trivfs_protid *cred, - int index, - memory_object_t *rdobj, - mach_msg_type_name_t *rdtype, - memory_object_t *wrobj, - mach_msg_type_name_t *wrtype) +trivfs_S_io_map(struct trivfs_protid *cred, + memory_object_t *rdobj, + mach_msg_type_name_t *rdtype, + memory_object_t *wrobj, + mach_msg_type_name_t *wrtype) { return EINVAL; } diff --git a/trans/new-fifo.c b/trans/new-fifo.c index 5afefa49..203a7d4d 100644 --- a/trans/new-fifo.c +++ b/trans/new-fifo.c @@ -1,6 +1,6 @@ /* A translator for fifos - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -499,12 +499,11 @@ trivfs_goaway (struct trivfs_control *fsys, int flags) mapping; they will set none of the ports and return an error. Such objects can still be accessed by io_read and io_write. */ error_t -trivfs_S_io_map_segment(struct trivfs_protid *cred, - int index, - memory_object_t *rdobj, - mach_msg_type_name_t *rdtype, - memory_object_t *wrobj, - mach_msg_type_name_t *wrtype) +trivfs_S_io_map(struct trivfs_protid *cred, + memory_object_t *rdobj, + mach_msg_type_name_t *rdtype, + memory_object_t *wrobj, + mach_msg_type_name_t *wrtype) { return EINVAL; } diff --git a/trans/null.c b/trans/null.c index b0924dbf..2729a639 100644 --- a/trans/null.c +++ b/trans/null.c @@ -99,12 +99,11 @@ trivfs_goaway (struct trivfs_control *fsys, int flags) mapping; they will set none of the ports and return an error. Such objects can still be accessed by io_read and io_write. */ kern_return_t -trivfs_S_io_map_segment(struct trivfs_protid *cred, - int index, - memory_object_t *rdobj, - mach_msg_type_name_t *rdtype, - memory_object_t *wrobj, - mach_msg_type_name_t *wrtype) +trivfs_S_io_map(struct trivfs_protid *cred, + memory_object_t *rdobj, + mach_msg_type_name_t *rdtype, + memory_object_t *wrobj, + mach_msg_type_name_t *wrtype) { return EINVAL; /* XXX should work! */ } diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 0ab45a3d..09d4b17a 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +1999-09-13 Roland McGrath <roland@baalperazim.frob.com> + + * dir.c, sizes.c, pager.c: Reverted changes related to io_map_segment. + 1999-09-09 Roland McGrath <roland@baalperazim.frob.com> * Makefile (makemode): servers -> server. @@ -144,7 +144,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, ds->stat = LOOKING; /* Map in the directory contents. */ - memobj = diskfs_get_filemap (dp, 0, prot); + memobj = diskfs_get_filemap (dp, prot); if (memobj == MACH_PORT_NULL) return errno; @@ -730,7 +730,7 @@ diskfs_dirempty(struct node *dp, memory_object_t memobj; error_t err; - memobj = diskfs_get_filemap (dp, 0, VM_PROT_READ); + memobj = diskfs_get_filemap (dp, VM_PROT_READ); if (memobj == MACH_PORT_NULL) /* XXX should reflect error properly */ @@ -839,7 +839,7 @@ diskfs_get_directs (struct node *dp, char buf[DIRBLKSIZ]; char *bufp; int bufvalid; - error_t err = 0; + error_t err; int i; char *datap; struct directory_entry *entryp; diff --git a/ufs/pager.c b/ufs/pager.c index 3cba748e..3038932d 100644 --- a/ufs/pager.c +++ b/ufs/pager.c @@ -547,13 +547,11 @@ flush_node_pager (struct node *node) /* Call this to create a FILE_DATA pager and return a send right. NP must be locked. PROT is the max protection desired. */ mach_port_t -diskfs_get_filemap (struct node *np, int index, vm_prot_t prot) +diskfs_get_filemap (struct node *np, vm_prot_t prot) { struct user_pager_info *upi; mach_port_t right; - assert (index == 0); /* XXX */ - assert (S_ISDIR (np->dn_stat.st_mode) || S_ISREG (np->dn_stat.st_mode) || (S_ISLNK (np->dn_stat.st_mode) diff --git a/ufs/sizes.c b/ufs/sizes.c index cffce158..58cbfc98 100644 --- a/ufs/sizes.c +++ b/ufs/sizes.c @@ -103,7 +103,7 @@ diskfs_truncate (struct node *np, pager_change_attributes (upi->p, MAY_CACHE, MEMORY_OBJECT_COPY_NONE, 1); - obj = diskfs_get_filemap (np, 0, VM_PROT_READ | VM_PROT_WRITE); + obj = diskfs_get_filemap (np, VM_PROT_READ | VM_PROT_WRITE); if (obj != MACH_PORT_NULL) { /* XXX should cope with errors from diskfs_get_filemap */ @@ -403,7 +403,7 @@ block_extended (struct node *np, volatile int *pokeaddr; /* Map in this part of the file */ - mapobj = diskfs_get_filemap (np, 0, VM_PROT_WRITE | VM_PROT_READ); + mapobj = diskfs_get_filemap (np, VM_PROT_WRITE | VM_PROT_READ); /* XXX Should cope with errors from diskfs_get_filemap and back out the operation here. */ @@ -484,7 +484,7 @@ diskfs_grow (struct node *np, assert (!diskfs_readonly); /* This reference will ensure that NP->dn->fileinfo stays allocated. */ - pagerpt = diskfs_get_filemap (np, 0, VM_PROT_WRITE|VM_PROT_READ); + pagerpt = diskfs_get_filemap (np, VM_PROT_WRITE|VM_PROT_READ); if (pagerpt == MACH_PORT_NULL) return errno; |