2 * (C) Copyright 2007-2011 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
4 * This file is released under the GPLv2. See the COPYING file for more
9 #include <binfmt_elf.h>
16 *! \tok{\sc IPL} <vdev>
22 *! \item Not yet implemented.
25 static int cmd_ipl(struct virt_sys
*sys
, char *cmd
, int len
)
30 SHELL_CMD_AUTH(sys
, G
);
33 c
= __extract_hex(cmd
, &vdevnum
);
37 /* device numbers are 16-bits */
38 if (vdevnum
& ~0xffff)
41 /* find the virtual device */
44 for_each_vdev(sys
, vdev
)
45 if (vdev
->pmcw
.dev_num
== (u16
) vdevnum
) {
46 ret
= guest_ipl_nss(sys
, "ipldev");
57 /* device not found */
58 return guest_ipl_nss(sys
, cmd
);
63 *! \tok{\sc SYStem} \tok{\sc CLEAR}
67 *! Identical to reset-clear button on a real mainframe.
70 *!p >>--SYSTEM--RESET-------------------------------------------------------------><
72 *! \tok{\sc SYStem} \tok{\sc RESET}
76 *! Identical to reset-normal button on a real mainframe.
80 *! \tok{\sc SYStem} \tok{\sc RESTART}
84 *! Perform a restart operation.
86 *! \item Not yet implemented.
91 *! \tok{\sc SYStem} \tok{\sc STORE}
97 *! \item Not yet implemented.
100 static int cmd_system(struct virt_sys
*sys
, char *cmd
, int len
)
102 SHELL_CMD_AUTH(sys
, G
);
104 if (!strcasecmp(cmd
, "CLEAR")) {
105 guest_system_reset_clear(sys
);
106 con_printf(sys
->con
, "STORAGE CLEARED - SYSTEM RESET\n");
107 } else if (!strcasecmp(cmd
, "RESET")) {
108 guest_system_reset_normal(sys
);
109 con_printf(sys
->con
, "SYSTEM RESET\n");
110 } else if (!strcasecmp(cmd
, "RESTART")) {
111 con_printf(sys
->con
, "SYSTEM RESTART is not yet supported\n");
112 } else if (!strcasecmp(cmd
, "STORE")) {
113 con_printf(sys
->con
, "SYSTEM STORE is not yet supported\n");
115 con_printf(sys
->con
, "SYSTEM: Unknown variable '%s'\n", cmd
);