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
24 /* This is used to con_printf to the operator about various async events -
27 struct console
*oper_con
;
29 static void process_cmd(struct virt_sys
*sys
)
34 // FIXME: read a line from the console
35 // ret = con_read(sys->con, cmd, 128);
39 return; /* no lines to read */
42 con_printf(sys
->con
, "CP\n");
43 return; /* empty line */
46 ebcdic2ascii(cmd
, ret
);
49 * we got a command to process!
51 ret
= invoke_shell_cmd(sys
, (char*) cmd
, ret
);
57 con_printf(sys
->con
, "Invalid CP command: %s\n", cmd
);
60 con_printf(sys
->con
, "Invalid CP sub-command: %s\n", cmd
);
63 con_printf(sys
->con
, "Operand missing or invalid\n");
66 con_printf(sys
->con
, "Not authorized\n");
69 con_printf(sys
->con
, "RC=%d (%s)\n", ret
,
75 int shell_start(void *data
)
77 struct virt_sys
*sys
= data
;
78 struct virt_cpu
*cpu
= sys
->cpu
;
82 * load guest's address space into the host's PASCE
87 con_printf(sys
->con
, "LOGON FOR %s AT %02d:%02d:%02d UTC %04d-%02d-%02d\n",
88 sys
->directory
->userid
, dt
.th
, dt
.tm
, dt
.ts
, dt
.dy
, dt
.dm
, dt
.dd
);
92 * - process any console input
93 * - if the guest is running
94 * - issue any pending interruptions
95 * - continue executing it
96 * - process any intercepts from SIE
102 if (cpu
->state
== GUEST_OPERATING
)