Files
rk35xx-android14/external/strace/reboot.c
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

29 lines
751 B
C

#include "defs.h"
#include "xlat/bootflags1.h"
#include "xlat/bootflags2.h"
#include "xlat/bootflags3.h"
SYS_FUNC(reboot)
{
const unsigned int magic1 = tcp->u_arg[0];
const unsigned int magic2 = tcp->u_arg[1];
const unsigned int cmd = tcp->u_arg[2];
printxval(bootflags1, magic1, "LINUX_REBOOT_MAGIC_???");
tprints(", ");
printxval(bootflags2, magic2, "LINUX_REBOOT_MAGIC_???");
tprints(", ");
printxval(bootflags3, cmd, "LINUX_REBOOT_CMD_???");
if (cmd == LINUX_REBOOT_CMD_RESTART2) {
tprints(", ");
/*
* The size of kernel buffer is 256 bytes and
* the last byte is always zero, at most 255 bytes
* are copied from the user space.
*/
printstr_ex(tcp, tcp->u_arg[3], 255, QUOTE_0_TERMINATED);
}
return RVAL_DECODED;
}