aboutsummaryrefslogtreecommitdiff
path: root/type.c
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2016-02-07 20:08:58 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-02-09 23:50:11 +0100
commite2e50a2471af7c8708d49323a3f000042a032b59 (patch)
tree05cf4b7abec488d81546ff9f4a9e7dabfd0c6630 /type.c
parentc01a23d17a84fc42caba4031241c050e4a533d3f (diff)
downloadmig-e2e50a2471af7c8708d49323a3f000042a032b59.tar.gz
mig-e2e50a2471af7c8708d49323a3f000042a032b59.tar.bz2
mig-e2e50a2471af7c8708d49323a3f000042a032b59.zip
Cast kernel server port arguments to the correct type.
* server.c: Add cast for ipc_port_t arguments that are handled differently. * type.c: Set itKernelPort when the mach_port_t is treated as a ipc_port_t. * type.h: Add itKernelPort to struct ipc_type.
Diffstat (limited to 'type.c')
-rw-r--r--type.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/type.c b/type.c
index 7565f34..4450b52 100644
--- a/type.c
+++ b/type.c
@@ -219,16 +219,19 @@ itCalculateNameInfo(ipc_type_t *it)
(((it->itInName == MACH_MSG_TYPE_POLYMORPHIC) &&
(it->itOutName == MACH_MSG_TYPE_POLYMORPHIC)) ||
MACH_MSG_TYPE_PORT_ANY(it->itInName) ||
- MACH_MSG_TYPE_PORT_ANY(it->itOutName)))
+ MACH_MSG_TYPE_PORT_ANY(it->itOutName))) {
it->itServerType = "ipc_port_t";
-
- if (IsKernelUser &&
+ it->itKernelPort = TRUE;
+ } else if (IsKernelUser &&
streql(it->itUserType, "mach_port_t") &&
(((it->itInName == MACH_MSG_TYPE_POLYMORPHIC) &&
(it->itOutName == MACH_MSG_TYPE_POLYMORPHIC)) ||
MACH_MSG_TYPE_PORT_ANY(it->itInName) ||
- MACH_MSG_TYPE_PORT_ANY(it->itOutName)))
+ MACH_MSG_TYPE_PORT_ANY(it->itOutName))) {
it->itUserType = "ipc_port_t";
+ it->itKernelPort = TRUE;
+ } else
+ it->itKernelPort = FALSE;
if (it->itTransType == strNULL)
it->itTransType = it->itServerType;