[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 51/98: libtrivfs: improve the trivfs_demuxer function
From: |
Samuel Thibault |
Subject: |
[hurd] 51/98: libtrivfs: improve the trivfs_demuxer function |
Date: |
Tue, 14 Jan 2014 02:00:01 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit e3c983ea9d62cdd0de86a8f4c4164c692252fb74
Author: Justus Winter <address@hidden>
Date: Sat Nov 30 17:20:40 2013 +0100
libtrivfs: improve the trivfs_demuxer function
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need to call mig_reply_setup.
* libtriv/demuxer.c (trivfs_demuxer): Improve the demuxer function.
---
libtrivfs/demuxer.c | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/libtrivfs/demuxer.c b/libtrivfs/demuxer.c
index 49ee45a..411699f 100644
--- a/libtrivfs/demuxer.c
+++ b/libtrivfs/demuxer.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1993, 1994 Free Software Foundation
+ Copyright (C) 1993, 1994, 2013 Free Software Foundation
This file is part of the GNU Hurd.
@@ -25,13 +25,23 @@ int
trivfs_demuxer (mach_msg_header_t *inp,
mach_msg_header_t *outp)
{
- int trivfs_fs_server (mach_msg_header_t *, mach_msg_header_t *);
- int trivfs_io_server (mach_msg_header_t *, mach_msg_header_t *);
- int trivfs_fsys_server (mach_msg_header_t *, mach_msg_header_t *);
-
- return (trivfs_io_server (inp, outp)
- || trivfs_fs_server (inp, outp)
- || ports_notify_server (inp, outp)
- || trivfs_fsys_server (inp, outp)
- || ports_interrupt_server (inp, outp));
+ mig_routine_t trivfs_io_server_routine (mach_msg_header_t *);
+ mig_routine_t trivfs_fs_server_routine (mach_msg_header_t *);
+ mig_routine_t ports_notify_server_routine (mach_msg_header_t *);
+ mig_routine_t trivfs_fsys_server_routine (mach_msg_header_t *);
+ mig_routine_t ports_interrupt_server_routine (mach_msg_header_t *);
+ mig_routine_t trivfs_ifsock_server_routine (mach_msg_header_t *);
+
+ mig_routine_t routine;
+ if ((routine = trivfs_io_server_routine (inp)) ||
+ (routine = trivfs_fs_server_routine (inp)) ||
+ (routine = ports_notify_server_routine (inp)) ||
+ (routine = trivfs_fsys_server_routine (inp)) ||
+ (routine = ports_interrupt_server_routine (inp)))
+ {
+ (*routine) (inp, outp);
+ return TRUE;
+ }
+ else
+ return FALSE;
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 33/98: usermux: actually use the computed flags value in netfs_attempt_utimes, (continued)
- [hurd] 33/98: usermux: actually use the computed flags value in netfs_attempt_utimes, Samuel Thibault, 2014/01/13
- [hurd] 32/98: nfsd: fix error handling in op_remove, Samuel Thibault, 2014/01/13
- [hurd] 30/98: fatfs: fix error handling in diskfs_lookup_hard, Samuel Thibault, 2014/01/13
- [hurd] 42/98: libports: improve error handling in ports_transfer_right, Samuel Thibault, 2014/01/13
- [hurd] 43/98: libdiskfs: improve error reporting in diskfs_start_disk_pager, Samuel Thibault, 2014/01/13
- [hurd] 44/98: libports: improve error reporting in adjust_priority, Samuel Thibault, 2014/01/13
- [hurd] 47/98: libfshelp: improve error handling in fshelp_start_translator_long, Samuel Thibault, 2014/01/13
- [hurd] 46/98: proc: store the device master port in _hurd_device_master, Samuel Thibault, 2014/01/13
- [hurd] 50/98: libnetfs: improve the netfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 31/98: fatfs: fix error handling in diskfs_get_directs, Samuel Thibault, 2014/01/13
- [hurd] 51/98: libtrivfs: improve the trivfs_demuxer function,
Samuel Thibault <=
- [hurd] 24/98: Clean up the included header files, Samuel Thibault, 2014/01/13
- [hurd] 54/98: pfinet: improve the pfinet_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 52/98: exec: improve the exec_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 34/98: mach-defpager: drop all register qualifiers, Samuel Thibault, 2014/01/13
- [hurd] 49/98: libdiskfs: improve the diskfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 56/98: auth: improve the auth_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 12/98: mach-defpager: remove unused variables, Samuel Thibault, 2014/01/13
- [hurd] 45/98: proc: store the privileged host port in _hurd_host_priv, Samuel Thibault, 2014/01/13
- [hurd] 36/98: libports: fix right leaks when adjusting priorities, Samuel Thibault, 2014/01/13
- [hurd] 65/98: trans: fix the use of the hash table in fakeroot.c, Samuel Thibault, 2014/01/13