]> Git Repo - qemu.git/blobdiff - monitor.c
disable PCI device for PMAC
[qemu.git] / monitor.c
index d3c51e657463ba49da700173ce430b827b943977..3c55c626516282054607c651214e1ce5584e07d4 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -660,6 +660,11 @@ static void do_ioport_read(int count, int format, int size, int addr, int has_in
                 suffix, addr, size * 2, val);
 }
 
+static void do_system_reset(void)
+{
+    qemu_system_reset_request();
+}
+
 static term_cmd_t term_cmds[] = {
     { "help|?", "s?", do_help, 
       "[cmd]", "show the help" },
@@ -700,6 +705,8 @@ static term_cmd_t term_cmds[] = {
 
     { "sendkey", "s", do_send_key, 
       "keys", "send keys to the VM (e.g. 'sendkey ctrl-alt-f1')" },
+    { "system_reset", "", do_system_reset, 
+      "", "reset the system" },
     { NULL, NULL, }, 
 };
 
@@ -1437,7 +1444,7 @@ static void term_show_prompt(void)
 static void term_print_cmdline (const char *cmdline)
 {
     term_show_prompt();
-    term_printf(cmdline);
+    term_printf("%s", cmdline);
     term_flush();
 }
 
@@ -1521,7 +1528,8 @@ static void term_up_char(void)
     }
     term_hist_entry--;
     if (term_hist_entry >= 0) {
-       strcpy(term_cmd_buf, term_history[term_hist_entry]);
+       pstrcpy(term_cmd_buf, sizeof(term_cmd_buf), 
+                term_history[term_hist_entry]);
        term_printf("\n");
        term_print_cmdline(term_cmd_buf);
        term_cmd_buf_index = term_cmd_buf_size = strlen(term_cmd_buf);
@@ -1533,7 +1541,8 @@ static void term_down_char(void)
     if (term_hist_entry == TERM_MAX_CMDS - 1 || term_hist_entry == -1)
        return;
     if (term_history[++term_hist_entry] != NULL) {
-       strcpy(term_cmd_buf, term_history[term_hist_entry]);
+       pstrcpy(term_cmd_buf, sizeof(term_cmd_buf),
+                term_history[term_hist_entry]);
     } else {
        term_hist_entry = -1;
     }
This page took 0.022071 seconds and 4 git commands to generate.