Loading console.c +4 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "qemu-common.h" #include "console.h" #include "qemu-timer.h" #include "qmp-commands.h" //#define DEBUG_CONSOLE #define DEFAULT_BACKSCROLL 512 Loading Loading @@ -176,7 +177,7 @@ void vga_hw_invalidate(void) active_console->hw_invalidate(active_console->hw); } void vga_hw_screen_dump(const char *filename) void qmp_screendump(const char *filename, Error **errp) { TextConsole *previous_active_console; bool cswitch; Loading @@ -190,9 +191,9 @@ void vga_hw_screen_dump(const char *filename) console_select(0); } if (consoles[0] && consoles[0]->hw_screen_dump) { consoles[0]->hw_screen_dump(consoles[0]->hw, filename, cswitch, NULL); consoles[0]->hw_screen_dump(consoles[0]->hw, filename, cswitch, errp); } else { error_report("screen dump not implemented"); error_setg(errp, "device doesn't support screendump\n"); } if (cswitch) { Loading console.h +0 −1 Original line number Diff line number Diff line Loading @@ -357,7 +357,6 @@ DisplayState *graphic_console_init(vga_hw_update_ptr update, void vga_hw_update(void); void vga_hw_invalidate(void); void vga_hw_screen_dump(const char *filename); void vga_hw_text_update(console_ch_t *chardata); int is_graphic_console(void); Loading hmp-commands.hx +1 −2 Original line number Diff line number Diff line Loading @@ -194,8 +194,7 @@ ETEXI .args_type = "filename:F", .params = "filename", .help = "save screen into PPM image 'filename'", .user_print = monitor_user_noop, .mhandler.cmd_new = do_screen_dump, .mhandler.cmd = hmp_screen_dump, }, STEXI Loading hmp.c +9 −0 Original line number Diff line number Diff line Loading @@ -1157,3 +1157,12 @@ void hmp_send_key(Monitor *mon, const QDict *qdict) hmp_handle_error(mon, &err); qapi_free_QKeyCodeList(head); } void hmp_screen_dump(Monitor *mon, const QDict *qdict) { const char *filename = qdict_get_str(qdict, "filename"); Error *err = NULL; qmp_screendump(filename, &err); hmp_handle_error(mon, &err); } hmp.h +1 −0 Original line number Diff line number Diff line Loading @@ -72,5 +72,6 @@ void hmp_netdev_del(Monitor *mon, const QDict *qdict); void hmp_getfd(Monitor *mon, const QDict *qdict); void hmp_closefd(Monitor *mon, const QDict *qdict); void hmp_send_key(Monitor *mon, const QDict *qdict); void hmp_screen_dump(Monitor *mon, const QDict *qdict); #endif Loading
console.c +4 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "qemu-common.h" #include "console.h" #include "qemu-timer.h" #include "qmp-commands.h" //#define DEBUG_CONSOLE #define DEFAULT_BACKSCROLL 512 Loading Loading @@ -176,7 +177,7 @@ void vga_hw_invalidate(void) active_console->hw_invalidate(active_console->hw); } void vga_hw_screen_dump(const char *filename) void qmp_screendump(const char *filename, Error **errp) { TextConsole *previous_active_console; bool cswitch; Loading @@ -190,9 +191,9 @@ void vga_hw_screen_dump(const char *filename) console_select(0); } if (consoles[0] && consoles[0]->hw_screen_dump) { consoles[0]->hw_screen_dump(consoles[0]->hw, filename, cswitch, NULL); consoles[0]->hw_screen_dump(consoles[0]->hw, filename, cswitch, errp); } else { error_report("screen dump not implemented"); error_setg(errp, "device doesn't support screendump\n"); } if (cswitch) { Loading
console.h +0 −1 Original line number Diff line number Diff line Loading @@ -357,7 +357,6 @@ DisplayState *graphic_console_init(vga_hw_update_ptr update, void vga_hw_update(void); void vga_hw_invalidate(void); void vga_hw_screen_dump(const char *filename); void vga_hw_text_update(console_ch_t *chardata); int is_graphic_console(void); Loading
hmp-commands.hx +1 −2 Original line number Diff line number Diff line Loading @@ -194,8 +194,7 @@ ETEXI .args_type = "filename:F", .params = "filename", .help = "save screen into PPM image 'filename'", .user_print = monitor_user_noop, .mhandler.cmd_new = do_screen_dump, .mhandler.cmd = hmp_screen_dump, }, STEXI Loading
hmp.c +9 −0 Original line number Diff line number Diff line Loading @@ -1157,3 +1157,12 @@ void hmp_send_key(Monitor *mon, const QDict *qdict) hmp_handle_error(mon, &err); qapi_free_QKeyCodeList(head); } void hmp_screen_dump(Monitor *mon, const QDict *qdict) { const char *filename = qdict_get_str(qdict, "filename"); Error *err = NULL; qmp_screendump(filename, &err); hmp_handle_error(mon, &err); }
hmp.h +1 −0 Original line number Diff line number Diff line Loading @@ -72,5 +72,6 @@ void hmp_netdev_del(Monitor *mon, const QDict *qdict); void hmp_getfd(Monitor *mon, const QDict *qdict); void hmp_closefd(Monitor *mon, const QDict *qdict); void hmp_send_key(Monitor *mon, const QDict *qdict); void hmp_screen_dump(Monitor *mon, const QDict *qdict); #endif