qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH] Report any problems with loading the VGA driver for PPC Maci


From: David Gibson
Subject: Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
Date: Sat, 28 Aug 2021 15:29:57 +1000

On Fri, Aug 27, 2021 at 11:15:26PM +0200, BALATON Zoltan wrote:
> On Fri, 27 Aug 2021, John Arbuckle wrote:
> > I was having a problem with missing video resolutions in my Mac OS 9 VM. 
> > When I
> > ran QEMU it gave no indication as to why these resolutions were missing. I 
> > found
> > out that the OpenFirmware VGA driver was not being loaded. To prevent 
> > anyone from
> > going thru the same trouble I went thru I added messages that the user can 
> > see
> > when a problem takes place with loading this driver in the future.
> > 
> > Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
> > ---
> > hw/ppc/mac_newworld.c | 6 ++++++
> > hw/ppc/mac_oldworld.c | 6 ++++++
> > 2 files changed, 12 insertions(+)
> > 
> > diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
> > index 7bb7ac3997..c1960452b8 100644
> > --- a/hw/ppc/mac_newworld.c
> > +++ b/hw/ppc/mac_newworld.c
> > @@ -526,8 +526,14 @@ static void ppc_core99_init(MachineState *machine)
> > 
> >         if (g_file_get_contents(filename, &ndrv_file, &ndrv_size, NULL)) {
> >             fw_cfg_add_file(fw_cfg, "ndrv/qemu_vga.ndrv", ndrv_file, 
> > ndrv_size);
> > +        } else {
> > +            printf("Warning: failed to load driver %s. This may cause 
> > video"
> > +                   " problems.\n");
> 
> I think you should use warn_report for these instead of printf and watch out
> if that needs \n or not (some functions add \n while some others may not and
> I always forget which is which but checkpatch should warn for it so you
> should get nofified if you leave \n there but it's not needed).

Yes, it definitely should be warn_report() rather than a raw printf.
Patches for Macintosh should also go to the relevant maintainer Mark
Cave-Ayland <mark.cave-ayland@ilande.co.uk>.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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