2 * ioctl.c for mdb -- decode an IOCTL system call
5 #ifdef SYSCALLS_SUPPORT
11 #include <minix/type.h>
12 #include <minix/callnr.h>
13 #include <minix/com.h>
14 #include <sys/ioctl.h>
18 static int get_request
;
22 * send or receive = 'R' or 'S'
24 void decode_ioctl(sr
, m
)
39 Printf("%c device=%d request=%c|%d m2_l1=%lx m2_l2=%lx\n",
41 (request
>> 8) & BYTE
,
46 if ( sr
== 'R') request
= get_request
;
49 Printf("Sending (%lx) ", request
);
50 get_request
= request
;
53 Printf("Receiving (%lx) ", request
);
55 high
= ( request
& 0xFFFF0000 ) >> 16 ;
56 request
&= _IOCTYPE_MASK
;
58 Printf("Other IOCTL device=%d request=%c|%d flags=%x size =%d\n",
59 device
, (request
>> 8) & BYTE
, request
& BYTE
,
60 (high
& ~_IOCPARM_MASK
),
61 (high
& _IOCPARM_MASK
)
67 #endif /* SYSCALLS_SUPPORT */