diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-12-07 16:20:22 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-01-27 18:07:59 +0100 |
commit | 0ec7b3e7f21caf6bfde404528928d600b661ea8d (patch) | |
tree | 85e1a8b7e7234d22b9e7fc4947f89d50f4bcbcfb /ui/gtk.c | |
parent | d5cafc733d21167fce7fcc3b45530ecb1f878e09 (diff) |
char: rename CharDriverState Chardev
Pick a uniform chardev type name.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r-- | ui/gtk.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -181,11 +181,11 @@ struct GtkDisplayState { bool ignore_keys; }; -typedef struct VCDriverState { - CharDriverState parent; +typedef struct VCChardev { + Chardev parent; VirtualConsole *console; bool echo; -} VCDriverState; +} VCChardev; static void gd_grab_pointer(VirtualConsole *vc, const char *reason); static void gd_ungrab_pointer(GtkDisplayState *s); @@ -1689,18 +1689,18 @@ static void gd_vc_adjustment_changed(GtkAdjustment *adjustment, void *opaque) } } -static int gd_vc_chr_write(CharDriverState *chr, const uint8_t *buf, int len) +static int gd_vc_chr_write(Chardev *chr, const uint8_t *buf, int len) { - VCDriverState *vcd = (VCDriverState *)chr; + VCChardev *vcd = (VCChardev *)chr; VirtualConsole *vc = vcd->console; vte_terminal_feed(VTE_TERMINAL(vc->vte.terminal), (const char *)buf, len); return len; } -static void gd_vc_chr_set_echo(CharDriverState *chr, bool echo) +static void gd_vc_chr_set_echo(Chardev *chr, bool echo) { - VCDriverState *vcd = (VCDriverState *)chr; + VCChardev *vcd = (VCChardev *)chr; VirtualConsole *vc = vcd->console; if (vc) { @@ -1711,19 +1711,19 @@ static void gd_vc_chr_set_echo(CharDriverState *chr, bool echo) } static int nb_vcs; -static CharDriverState *vcs[MAX_VCS]; +static Chardev *vcs[MAX_VCS]; -static CharDriverState *gd_vc_handler(ChardevVC *vc, Error **errp) +static Chardev *gd_vc_handler(ChardevVC *vc, Error **errp) { static const CharDriver gd_vc_driver = { - .instance_size = sizeof(VCDriverState), + .instance_size = sizeof(VCChardev), .kind = CHARDEV_BACKEND_KIND_VC, .chr_write = gd_vc_chr_write, .chr_set_echo = gd_vc_chr_set_echo, }; ChardevCommon *common = qapi_ChardevVC_base(vc); - CharDriverState *chr; + Chardev *chr; if (nb_vcs == MAX_VCS) { error_setg(errp, "Maximum number of consoles reached"); @@ -1768,14 +1768,14 @@ static gboolean gd_vc_in(VteTerminal *terminal, gchar *text, guint size, } static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc, - CharDriverState *chr, int idx, + Chardev *chr, int idx, GSList *group, GtkWidget *view_menu) { char buffer[32]; GtkWidget *box; GtkWidget *scrollbar; GtkAdjustment *vadjustment; - VCDriverState *vcd = (VCDriverState *)chr; + VCChardev *vcd = (VCChardev *)chr; vc->s = s; vc->vte.echo = vcd->echo; |