diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-02-24 13:57:40 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-02-25 11:16:16 +0100 |
commit | b7521a33ad61286eb9e32915c3a691c824bae719 (patch) | |
tree | 7cb2f9212f15bb96c7ea11d18478ef7791b467ad /mach-defpager | |
parent | d1f23fd4732f9407dfd80e15588070d920050d9f (diff) |
mach-defpager: add function mig_reply_setup
Currently, mig_reply_setup is not provided by libmachuser or the
glibc. Provide it locally.
* mach-defpager/default_pager.c (mig_reply_setup): New function.
Diffstat (limited to 'mach-defpager')
-rw-r--r-- | mach-defpager/default_pager.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c index 4d604fee..805e0654 100644 --- a/mach-defpager/default_pager.c +++ b/mach-defpager/default_pager.c @@ -3028,6 +3028,37 @@ extern void bootstrap_compat(); mach_msg_size_t default_pager_msg_size_object = 128; +/* Fill in default response. */ +static void +mig_reply_setup ( + const mach_msg_header_t *in, + mach_msg_header_t *out) +{ + static const mach_msg_type_t RetCodeType = { + /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32, + /* msgt_size = */ 32, + /* msgt_number = */ 1, + /* msgt_inline = */ TRUE, + /* msgt_longform = */ FALSE, + /* msgt_deallocate = */ FALSE, + /* msgt_unused = */ 0 + }; + +#define InP (in) +#define OutP ((mig_reply_header_t *) out) + OutP->Head.msgh_bits = + MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(InP->msgh_bits), 0); + OutP->Head.msgh_size = sizeof *OutP; + OutP->Head.msgh_remote_port = InP->msgh_remote_port; + OutP->Head.msgh_local_port = MACH_PORT_NULL; + OutP->Head.msgh_seqno = 0; + OutP->Head.msgh_id = InP->msgh_id + 100; + OutP->RetCodeType = RetCodeType; + OutP->RetCode = MIG_BAD_ID; +#undef InP +#undef OutP +} + boolean_t default_pager_demux_object(in, out) mach_msg_header_t *in; |