aboutsummaryrefslogtreecommitdiffstats
path: root/reboot.c
blob: 5c4752d9441307cad98bae04bad38baf824fc886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "defs.h"

#include "xlat/bootflags1.h"
#include "xlat/bootflags2.h"
#include "xlat/bootflags3.h"

int
sys_reboot(struct tcb *tcp)
{
	if (exiting(tcp))
		return 0;

	printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???");
	tprints(", ");
	printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???");
	tprints(", ");
	printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???");
	if (tcp->u_arg[2] == (long) LINUX_REBOOT_CMD_RESTART2) {
		tprints(", ");
		printstr(tcp, tcp->u_arg[3], -1);
	}
	return 0;
}