Since these are architecture-independent and have been added over the
kernel's lifetime, it makes sense to have these definitions in strace
itself.
* xlat/loop_cmds.in: New file.
* loop.c: Include "xlat/loop_cmds.h".
(loop_ioctl): Eliminate conditional compilation based on availability
of LOOP_* constant definitions.
#include MPERS_DEFS
+#include "xlat/loop_cmds.h"
#include "xlat/loop_flags_options.h"
#include "xlat/loop_crypt_type_options.h"
break;
case LOOP_CLR_FD:
-#ifdef LOOP_SET_CAPACITY
case LOOP_SET_CAPACITY:
-#endif
-#ifdef LOOP_CTL_GET_FREE
/* newer loop-control stuff */
case LOOP_CTL_GET_FREE:
-#endif
/* Takes no arguments */
break;
printfd(tcp, arg);
break;
-#ifdef LOOP_CTL_ADD
/* newer loop-control stuff */
case LOOP_CTL_ADD:
case LOOP_CTL_REMOVE:
tprintf(", %d", (int) arg);
break;
-#endif
-#ifdef LOOP_SET_DIRECT_IO
case LOOP_SET_DIRECT_IO:
tprintf(", %" PRI_klu, arg);
break;
-#endif
default:
return RVAL_DECODED;
--- /dev/null
+LOOP_SET_FD 0x4C00
+LOOP_CLR_FD 0x4C01
+LOOP_SET_STATUS 0x4C02
+LOOP_GET_STATUS 0x4C03
+LOOP_SET_STATUS64 0x4C04
+LOOP_GET_STATUS64 0x4C05
+LOOP_CHANGE_FD 0x4C06
+LOOP_SET_CAPACITY 0x4C07
+LOOP_SET_DIRECT_IO 0x4C08
+LOOP_CTL_ADD 0x4C80
+LOOP_CTL_REMOVE 0x4C81
+LOOP_CTL_GET_FREE 0x4C82
+#stop