diff options
author | Thomas Bushnell <thomas@gnu.org> | 1997-04-16 20:09:23 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1997-04-16 20:09:23 +0000 |
commit | 5ba64db7773e8e94d9235914663e01000947bced (patch) | |
tree | dc09d88843b44aa131ea698da603f71b51772bd4 | |
parent | 90458110d922016645babe00b8f558bd36362380 (diff) |
Thu Apr 10 13:54:31 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* dlabel.c: Don't include <mach/sa/sys/ioctl.h>.
(_IOR, _IOC, IOC_OUT, IOCPARM_MASK): New macros.
-rw-r--r-- | ufs-utils/ChangeLog | 5 | ||||
-rw-r--r-- | ufs-utils/dlabel.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/ufs-utils/ChangeLog b/ufs-utils/ChangeLog index 71d92548..656a25ec 100644 --- a/ufs-utils/ChangeLog +++ b/ufs-utils/ChangeLog @@ -1,3 +1,8 @@ +Thu Apr 10 13:54:31 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> + + * dlabel.c: Don't include <mach/sa/sys/ioctl.h>. + (_IOR, _IOC, IOC_OUT, IOCPARM_MASK): New macros. + Wed Feb 19 23:10:54 1997 Miles Bader <miles@gnu.ai.mit.edu> * mkfs.c (argp_program_version): Make const. diff --git a/ufs-utils/dlabel.c b/ufs-utils/dlabel.c index e3678310..a51fc8ec 100644 --- a/ufs-utils/dlabel.c +++ b/ufs-utils/dlabel.c @@ -23,9 +23,15 @@ #include <mach.h> #include <string.h> #include <device/device.h> -#include <mach/sa/sys/ioctl.h> /* Ick */ #include <device/disk_status.h> #include <hurd/store.h> + +/* XXX Ick. */ +#define IOCPARM_MASK 0x1fff/* parameter length, at most 13 bits */ +#define IOC_OUT 0x40000000/* copy out parameters */ +#define _IOC(inout,group,num,len) \ + (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)) +#define _IOR(g,n,t) _IOC(IOC_OUT,(g), (n), sizeof(t)) static error_t fd_get_device (int fd, device_t *device) |