Commit d7098135 authored by Luiz Capitulino's avatar Luiz Capitulino
Browse files

console: vga_hw_screen_dump_ptr: take Error argument



All devices that register a screen dump callback via
graphic_console_init() are updated.

The new argument is not used in this commit. Error handling will
be added to each device individually later.

This change is a preparation to convert the screendump command
to the QAPI.

Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
parent 75d789f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ 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);
        consoles[0]->hw_screen_dump(consoles[0]->hw, filename, cswitch, NULL);
    } else {
        error_report("screen dump not implemented");
    }
+3 −1
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
#include "monitor.h"
#include "trace.h"
#include "qapi-types.h"
#include "error.h"

/* keyboard/mouse support */

@@ -344,7 +345,8 @@ static inline void console_write_ch(console_ch_t *dest, uint32_t ch)

typedef void (*vga_hw_update_ptr)(void *);
typedef void (*vga_hw_invalidate_ptr)(void *);
typedef void (*vga_hw_screen_dump_ptr)(void *, const char *, bool cswitch);
typedef void (*vga_hw_screen_dump_ptr)(void *, const char *, bool cswitch,
                                       Error **errp);
typedef void (*vga_hw_text_update_ptr)(void *, console_ch_t *);

DisplayState *graphic_console_init(vga_hw_update_ptr update,
+1 −1
Original line number Diff line number Diff line
@@ -933,7 +933,7 @@ static void blizzard_update_display(void *opaque)
}

static void blizzard_screen_dump(void *opaque, const char *filename,
                                 bool cswitch)
                                 bool cswitch, Error **errp)
{
    BlizzardState *s = (BlizzardState *) opaque;

+2 −1
Original line number Diff line number Diff line
@@ -289,7 +289,8 @@ static void g364fb_reset(G364State *s)
    g364fb_invalidate_display(s);
}

static void g364fb_screen_dump(void *opaque, const char *filename, bool cswitch)
static void g364fb_screen_dump(void *opaque, const char *filename, bool cswitch,
                               Error **errp)
{
    G364State *s = opaque;
    int y, x;
+2 −1
Original line number Diff line number Diff line
@@ -264,7 +264,8 @@ static int ppm_save(const char *filename, uint8_t *data,
    return 0;
}

static void omap_screen_dump(void *opaque, const char *filename, bool cswitch)
static void omap_screen_dump(void *opaque, const char *filename, bool cswitch,
                             Error **errp)
{
    struct omap_lcd_panel_s *omap_lcd = opaque;

Loading