[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] console: Don't expose the the ui module's fun

From: Anthony Liguori
Subject: Re: [Qemu-trivial] [PATCH] console: Don't expose the the ui module's functions when the module is not available.
Date: Mon, 25 Jul 2011 21:32:43 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10

On 07/25/2011 09:24 PM, TeLeMan wrote:
If there is no sdl support, the implement of sdl_display_init() is missing and 
its declaration should not be exposed.
vnc, cocoa, curses and other ui modules are the same as sdl.

Signed-off-by: TeLeMan<address@hidden>


There's no harm in exposing these and it avoids cluttered #ifdefs.


Anthony Liguori

  console.h |    9 ++++++++-
  1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/console.h b/console.h
index 67d1373..ede8bea 100644
--- a/console.h
+++ b/console.h
@@ -363,19 +363,24 @@ void qemu_console_copy(DisplayState *ds, int src_x, int 
                         int dst_x, int dst_y, int w, int h);

  /* sdl.c */
+#ifdef CONFIG_SDL
  void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);

  /* cocoa.m */
  void cocoa_display_init(DisplayState *ds, int full_screen);

  /* vnc.c */
+#ifdef CONFIG_VNC
  void vnc_display_init(DisplayState *ds);
  void vnc_display_close(DisplayState *ds);
  int vnc_display_open(DisplayState *ds, const char *display);
  void vnc_display_add_client(DisplayState *ds, int csock, int skipauth);
  int vnc_display_disable_login(DisplayState *ds);
  char *vnc_display_local_addr(DisplayState *ds);
-#ifdef CONFIG_VNC
  int vnc_display_password(DisplayState *ds, const char *password);
  int vnc_display_pw_expire(DisplayState *ds, time_t expires);
  void do_info_vnc_print(Monitor *mon, const QObject *data);
@@ -401,6 +406,8 @@ static inline void do_info_vnc_print(Monitor *mon, const 
QObject *data)

  /* curses.c */
  void curses_display_init(DisplayState *ds, int full_screen);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]