diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2011-03-16 13:33:36 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-03-22 08:39:12 -0500 |
commit | 821601ea5b02a68ada479731a4d3d07a9876632a (patch) | |
tree | 1d99ac90c4a076ebd06f3c9df1656186f0b56cf2 /console.h | |
parent | 47b053690e8582ab52e09181c2c3f19a2ade134f (diff) |
Make VNC support optional
Per default VNC is enabled.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'console.h')
-rw-r--r-- | console.h | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -4,6 +4,8 @@ #include "qemu-char.h" #include "qdict.h" #include "notify.h" +#include "qerror.h" +#include "monitor.h" /* keyboard/mouse support */ @@ -370,12 +372,32 @@ void cocoa_display_init(DisplayState *ds, int full_screen); void vnc_display_init(DisplayState *ds); void vnc_display_close(DisplayState *ds); int vnc_display_open(DisplayState *ds, const char *display); -int vnc_display_password(DisplayState *ds, const char *password); 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); void do_info_vnc(Monitor *mon, QObject **ret_data); -char *vnc_display_local_addr(DisplayState *ds); +#else +static inline int vnc_display_password(DisplayState *ds, const char *password) +{ + qerror_report(QERR_FEATURE_DISABLED, "vnc"); + return -ENODEV; +} +static inline int vnc_display_pw_expire(DisplayState *ds, time_t expires) +{ + qerror_report(QERR_FEATURE_DISABLED, "vnc"); + return -ENODEV; +}; +static inline void do_info_vnc(Monitor *mon, QObject **ret_data) +{ +}; +static inline void do_info_vnc_print(Monitor *mon, const QObject *data) +{ + monitor_printf(mon, "VNC support disabled\n"); +}; +#endif /* curses.c */ void curses_display_init(DisplayState *ds, int full_screen); |