qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 54/67] ui/vc: console-vc requires PIXMAN


From: Daniel P . Berrangé
Subject: Re: [PATCH 54/67] ui/vc: console-vc requires PIXMAN
Date: Mon, 4 Sep 2023 14:44:17 +0100
User-agent: Mutt/2.2.9 (2022-11-12)

On Mon, Sep 04, 2023 at 05:41:23PM +0400, Marc-André Lureau wrote:
> Hi
> 
> On Fri, Sep 1, 2023 at 9:28 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Wed, Aug 30, 2023 at 01:38:28PM +0400, marcandre.lureau@redhat.com wrote:
> > > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > >
> > > Add stubs for the fallback paths.
> > >
> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > > ---
> > >  ui/console-vc-stubs.c | 59 +++++++++++++++++++++++++++++++++++++++++++
> > >  ui/meson.build        |  2 +-
> > >  2 files changed, 60 insertions(+), 1 deletion(-)
> > >  create mode 100644 ui/console-vc-stubs.c
> > >
> > > diff --git a/ui/console-vc-stubs.c b/ui/console-vc-stubs.c
> > > new file mode 100644
> > > index 0000000000..76ea880d27
> > > --- /dev/null
> > > +++ b/ui/console-vc-stubs.c
> > > @@ -0,0 +1,59 @@
> > > +/*
> > > + * SPDX-License-Identifier: GPL-2.0-or-later
> > > + * QEMU VC stubs
> > > + */
> > > +#include "qemu/osdep.h"
> > > +
> > > +#include "qapi/error.h"
> > > +#include "qemu/error-report.h"
> > > +#include "qemu/option.h"
> > > +#include "chardev/char.h"
> > > +#include "ui/console-priv.h"
> > > +
> > > +void qemu_text_console_select(QemuTextConsole *c)
> > > +{
> > > +}
> > > +
> > > +const char * qemu_text_console_get_label(QemuTextConsole *c)
> > > +{
> > > +    return NULL;
> > > +}
> > > +
> > > +void qemu_text_console_update_cursor(void)
> > > +{
> > > +}
> > > +
> > > +void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym)
> > > +{
> > > +}
> > > +
> > > +#define TYPE_CHARDEV_VC "chardev-vc"
> > > +
> > > +static void vc_chr_parse(QemuOpts *opts, ChardevBackend *backend, Error 
> > > **errp)
> > > +{
> > > +    const char *id = qemu_opts_id(opts);
> > > +
> > > +    warn_report("%s: this is a dummy VC driver. "
> > > +                "Use '-nographic' or a different chardev.", id);
> > > +}
> >
> > Why should this be an error_setg() call given we have a errp
> > parameter, so make this unsupportable config into an error ?
> > Ignoring invalid user configs is not desirable in general.
> 
> This was to keep starting as default, regardless of pixman support.
> 
> Since, by default, QEMU will create the following VCs (vl.c):
> 
>             add_device_config(DEV_SERIAL, "vc:80Cx24C");
>             add_device_config(DEV_PARALLEL, "vc:80Cx24C");
>             monitor_parse("vc:80Cx24C", "readline", false);
> 
> With SDL or VNC, this will associate the QemuTextConsole(s), which is
> disabled without pixman. Maybe we shouldn't create those VC by default
> when the backend doesn't support it (but to null instead).

Yeah, probably best to just use 'null' of 'vc' for that scenario,
since the stub is effectively 'null' anyway.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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