blob: 1669a3d1639b29a288aaee0bd61126c22a008b7c [file] [log] [blame]
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +00001#include "defs.h"
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +00002
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +00003#include "xlat/bootflags1.h"
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +00004#include "xlat/bootflags2.h"
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +00005#include "xlat/bootflags3.h"
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +00006
Dmitry V. Levina0bd3742015-04-07 01:36:50 +00007SYS_FUNC(reboot)
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +00008{
Dmitry V. Levinb83bb1c2016-04-26 17:41:44 +00009 const unsigned int magic1 = tcp->u_arg[0];
10 const unsigned int magic2 = tcp->u_arg[1];
11 const unsigned int cmd = tcp->u_arg[2];
12
13 printflags(bootflags1, magic1, "LINUX_REBOOT_MAGIC_???");
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +000014 tprints(", ");
Dmitry V. Levinb83bb1c2016-04-26 17:41:44 +000015 printflags(bootflags2, magic2, "LINUX_REBOOT_MAGIC_???");
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +000016 tprints(", ");
Dmitry V. Levinb83bb1c2016-04-26 17:41:44 +000017 printflags(bootflags3, cmd, "LINUX_REBOOT_CMD_???");
18 if (cmd == LINUX_REBOOT_CMD_RESTART2) {
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +000019 tprints(", ");
20 printstr(tcp, tcp->u_arg[3], -1);
21 }
Dmitry V. Levin307945d2015-07-17 20:27:00 +000022 return RVAL_DECODED;
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +000023}