Skip to contentSkip to conversation

vl: always define no_frame

PATCH Applied Michael Tokarev 4 participants 5 messages Jun 15, 2013 – Jun 17, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vl: always define no_frame

Commit 047d4e151dd46 "Unbreak -no-quit for GTK, validate SDL options" broke build of qemu without sdl, by referencing `no_frame' variable which is defined inside #if SDL block. Fix that by defining that variable unconditionally.

This is a better fix for the build issue introduced by that patch than a revert. This change keeps the new functinality introduced by that patch and just fixes the compilation. It still is not a complete fix around the original issue (not working -no-frame et al with -display gtk), because it makes only the legacy interface working, not the new suboption interface, so a few more changes are needed.

---
 vl.c |    2 --
 1 file changed, 2 deletions(-)
vl.c +0 -2
index 9f8fd6e..f94ec9c 100644
@@ -199,9 +199,7 @@ static int rtc_date_offset = -1; /* -1 means no change */
 QEMUClock *rtc_clock;
 int vga_interface_type = VGA_NONE;
 static int full_screen = 0;
-#ifdef CONFIG_SDL
 static int no_frame = 0;
-#endif
 int no_quit = 0;
 CharDriverState *serial_hds[MAX_SERIAL_PORTS];
 CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · On Saturday 15 June 2013 14:42:03 Michael Tokarev wrote:

Commit 047d4e151dd46 "Unbreak -no-quit for GTK, validate SDL options" broke build of qemu without sdl, by referencing `no_frame' variable which is defined inside #if SDL block. Fix that by defining that variable unconditionally.

This is a better fix for the build issue introduced by that patch than a revert. This change keeps the new functinality introduced by that patch and just fixes the compilation. It still is not a complete fix around the original issue (not working -no-frame et al with -display gtk), because it makes only the legacy interface working, not the new suboption interface, so a few more changes are needed.

-no-frame was deemed to be a SDL feature that was unnecessary for GTK, hence dropped. At run-time, it is checked whether -no-frame makes sense or not (that is, if -display sdl was specified or not). Original patch and discussion can be found at
http://lists.nongnu.org/archive/html/qemu-devel/2013-06/msg01297.html.

As for the discussion about legacy options[1], are there plans to remove -sdl (replaced by -display sdl) and move the -*-grab and -no-frame to -display sdl options? If that is the idea, what about printing a message that the mentioned options are deprecated and removed in a future version?

Regards,
Peter

[1]: http://lists.nongnu.org/archive/html/qemu-devel/2013-06/msg02437.html

Quoted 21 lines
---
 vl.c |    2 --
 1 file changed, 2 deletions(-)
vl.c +0 -2
index 9f8fd6e..f94ec9c 100644
@@ -199,9 +199,7 @@ static int rtc_date_offset = -1; /* -1 means no change
 */ QEMUClock *rtc_clock;
 int vga_interface_type = VGA_NONE;
 static int full_screen = 0;
-#ifdef CONFIG_SDL
 static int no_frame = 0;
-#endif
 int no_quit = 0;
 CharDriverState *serial_hds[MAX_SERIAL_PORTS];
 CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
#2 lore raw
Quoted 8 lines · Peter Wu
Quoted 4 lines · On Saturday 15 June 2013 14:42:03 Michael Tokarev wrote:

Commit 047d4e151dd46 "Unbreak -no-quit for GTK, validate SDL options" broke build of qemu without sdl, by referencing `no_frame' variable which is defined inside #if SDL block. Fix that by defining that variable unconditionally.

Thanks!

Quoted 1 line

As for the discussion about legacy options[1], are there plans to remove -sdl (replaced by -display sdl) and move the -*-grab and -no-frame to -display sdl options? If that is the idea, what about printing a message that the mentioned options are deprecated and removed in a future version?

This is already done for sdl, see select_display() function in vl.c -- it handles -display sdl,frame={on|off},...

It is unlikely the old options will be removed any time soon, and these will not likely print any warnings either -- this hasn't done for lots of other old options (-stdvga for example).

Thanks,

/mjt

Tested-by on v1 1/1
#3 lore raw
In reply to Michael Tokarev

Am 15.06.2013 12:42, schrieb Michael Tokarev:

Quoted 11 lines

Commit 047d4e151dd46 "Unbreak -no-quit for GTK, validate SDL options" broke build of qemu without sdl, by referencing `no_frame' variable which is defined inside #if SDL block. Fix that by defining that variable unconditionally.

This is a better fix for the build issue introduced by that patch than a revert. This change keeps the new functinality introduced by that patch and just fixes the compilation. It still is not a complete fix around the original issue (not working -no-frame et al with -display gtk), because it makes only the legacy interface working, not the new suboption interface, so a few more changes are needed.

Quoted 3 lines

Unbreaks my headless ppc build.

Thanks,
Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg