From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: alevy@redhat.com, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH v2 2/3] Remove screendump dummy functions.
Date: Fri, 24 Feb 2012 12:43:44 +0100 [thread overview]
Message-ID: <1330083825-30550-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1330083825-30550-1-git-send-email-kraxel@redhat.com>
The code in console.c verifies whenever a screen_dump function
pointer is present before calling it, so there is no need to supply an
dummy function. Remove them. Also report an error to notify the user
that he didn't got a screenshot.
---
console.c | 2 ++
hw/jazz_led.c | 7 +------
hw/pxa2xx_lcd.c | 7 +------
3 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/console.c b/console.c
index 135394f..153424f 100644
--- a/console.c
+++ b/console.c
@@ -184,6 +184,8 @@ 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);
+ } else {
+ error_report("screen dump not implemented");
}
if (previous_active_console) {
diff --git a/hw/jazz_led.c b/hw/jazz_led.c
index 5d8040b..6486523 100644
--- a/hw/jazz_led.c
+++ b/hw/jazz_led.c
@@ -205,11 +205,6 @@ static void jazz_led_invalidate_display(void *opaque)
s->state |= REDRAW_SEGMENTS | REDRAW_BACKGROUND;
}
-static void jazz_led_screen_dump(void *opaque, const char *filename)
-{
- printf("jazz_led_screen_dump() not implemented\n");
-}
-
static void jazz_led_text_update(void *opaque, console_ch_t *chardata)
{
LedState *s = opaque;
@@ -255,7 +250,7 @@ static int jazz_led_init(SysBusDevice *dev)
s->ds = graphic_console_init(jazz_led_update_display,
jazz_led_invalidate_display,
- jazz_led_screen_dump,
+ NULL,
jazz_led_text_update, s);
return 0;
diff --git a/hw/pxa2xx_lcd.c b/hw/pxa2xx_lcd.c
index 9495226..fcbdfb3 100644
--- a/hw/pxa2xx_lcd.c
+++ b/hw/pxa2xx_lcd.c
@@ -899,11 +899,6 @@ static void pxa2xx_invalidate_display(void *opaque)
s->invalidated = 1;
}
-static void pxa2xx_screen_dump(void *opaque, const char *filename)
-{
- /* TODO */
-}
-
static void pxa2xx_lcdc_orientation(void *opaque, int angle)
{
PXA2xxLCDState *s = (PXA2xxLCDState *) opaque;
@@ -1009,7 +1004,7 @@ PXA2xxLCDState *pxa2xx_lcdc_init(MemoryRegion *sysmem,
s->ds = graphic_console_init(pxa2xx_update_display,
pxa2xx_invalidate_display,
- pxa2xx_screen_dump, NULL, s);
+ NULL, NULL, s);
switch (ds_get_bits_per_pixel(s->ds)) {
case 0:
--
1.7.1
next prev parent reply other threads:[~2012-02-24 11:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-24 11:43 [Qemu-devel] [PATCH v2 0/3] screendump fixups Gerd Hoffmann
2012-02-24 11:43 ` [Qemu-devel] [PATCH v2 1/3] vga: simplify screendump Gerd Hoffmann
2012-02-24 11:43 ` Gerd Hoffmann [this message]
2012-02-24 11:43 ` [Qemu-devel] [PATCH v2 3/3] optimize screendump for the common non-switch case Gerd Hoffmann
2012-02-24 19:40 ` [Qemu-devel] [PATCH v2 0/3] screendump fixups Alon Levy
2012-02-24 19:48 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330083825-30550-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=alevy@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).