Dmitry V. Levin | 9aaf88c | 2014-02-05 14:51:19 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | #include <linux/reboot.h> |
| 3 | |
Dmitry V. Levin | 0ed617b | 2014-04-25 23:30:54 +0000 | [diff] [blame^] | 4 | #include "xlat/bootflags1.h" |
Dmitry V. Levin | 9aaf88c | 2014-02-05 14:51:19 +0000 | [diff] [blame] | 5 | |
Dmitry V. Levin | 0ed617b | 2014-04-25 23:30:54 +0000 | [diff] [blame^] | 6 | #include "xlat/bootflags2.h" |
Dmitry V. Levin | 9aaf88c | 2014-02-05 14:51:19 +0000 | [diff] [blame] | 7 | |
Dmitry V. Levin | 0ed617b | 2014-04-25 23:30:54 +0000 | [diff] [blame^] | 8 | #include "xlat/bootflags3.h" |
Dmitry V. Levin | 9aaf88c | 2014-02-05 14:51:19 +0000 | [diff] [blame] | 9 | |
| 10 | int |
| 11 | sys_reboot(struct tcb *tcp) |
| 12 | { |
| 13 | if (exiting(tcp)) |
| 14 | return 0; |
| 15 | |
| 16 | printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???"); |
| 17 | tprints(", "); |
| 18 | printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???"); |
| 19 | tprints(", "); |
| 20 | printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???"); |
| 21 | if (tcp->u_arg[2] == LINUX_REBOOT_CMD_RESTART2) { |
| 22 | tprints(", "); |
| 23 | printstr(tcp, tcp->u_arg[3], -1); |
| 24 | } |
| 25 | return 0; |
| 26 | } |