]> granicus.if.org Git - strace/blob - reboot.c
Fix ioctl entries on 32-bit architectures with 64-bit aligned structures
[strace] / reboot.c
1 #include "defs.h"
2
3 #include "xlat/bootflags1.h"
4 #include "xlat/bootflags2.h"
5 #include "xlat/bootflags3.h"
6
7 SYS_FUNC(reboot)
8 {
9         if (exiting(tcp))
10                 return 0;
11
12         printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???");
13         tprints(", ");
14         printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???");
15         tprints(", ");
16         printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???");
17         if (tcp->u_arg[2] == (long) LINUX_REBOOT_CMD_RESTART2) {
18                 tprints(", ");
19                 printstr(tcp, tcp->u_arg[3], -1);
20         }
21         return 0;
22 }