]> granicus.if.org Git - strace/blob - reboot.c
signal.c: move siginfo_t parsers to a separate file
[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 int
8 sys_reboot(struct tcb *tcp)
9 {
10         if (exiting(tcp))
11                 return 0;
12
13         printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???");
14         tprints(", ");
15         printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???");
16         tprints(", ");
17         printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???");
18         if (tcp->u_arg[2] == (long) LINUX_REBOOT_CMD_RESTART2) {
19                 tprints(", ");
20                 printstr(tcp, tcp->u_arg[3], -1);
21         }
22         return 0;
23 }