diff options
author | Roland McGrath <roland@gnu.org> | 1999-01-25 08:42:15 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1999-01-25 08:42:15 +0000 |
commit | d7440f640efc06dfadd9ebf2ffa9a3f262e0be3b (patch) | |
tree | b0e8c4166f256fa77349b9e2fdf48b2c2dd1471b /sysdeps | |
parent | b710a6e220839b768df24ffa59ff0a7f3e1ca943 (diff) | |
download | glibc-d7440f640efc06dfadd9ebf2ffa9a3f262e0be3b.tar.gz glibc-d7440f640efc06dfadd9ebf2ffa9a3f262e0be3b.tar.xz glibc-d7440f640efc06dfadd9ebf2ffa9a3f262e0be3b.zip |
1999-01-24 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/ioctl.c: Include <hurd/ioctls.defs>. (__ioctl): Use IOC_MSGID macro.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/mach/hurd/ioctl.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c index 1a7c42aad7..8d8ac9adcd 100644 --- a/sysdeps/mach/hurd/ioctl.c +++ b/sysdeps/mach/hurd/ioctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 94, 95, 96, 97, 99 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -28,6 +28,8 @@ #include <hurd/ioctl.h> #include <mach/mig_support.h> +#include <hurd/ioctls.defs> + #define typesize(type) (1 << (type)) @@ -144,17 +146,7 @@ __ioctl (int fd, unsigned long int request, ...) /* Compute the Mach message ID for the RPC from the group and command parts of the ioctl request. */ - msgid = 100000 + ((_IOC_GROUP (request) - 'f') * 4000); /* Base subsystem */ - /* Because of MiG's poorly chosen algorithm of adding 100 to a request - msgid to produce the reply msgid, we cannot just add the command part - of the ioctl request to the subsystem base msgid. For ioctl requests - past 99, we must skip blocks of 100 msgids to allow for the reply - msgids corresponding to the earlier requests. */ - if (_IOC_COMMAND (request) >= 100) - msgid += 100; - if (_IOC_COMMAND (request) >= 200) - msgid += 100; - msgid += _IOC_COMMAND (request); + msgid = IOC_MSGID (request); if (_IOC_INOUT (request) & IOC_IN) { |