qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 1/1] modules: Improve error message when module is not fou


From: Gerd Hoffmann
Subject: Re: [PATCH v2 1/1] modules: Improve error message when module is not found
Date: Fri, 23 Jul 2021 11:52:31 +0200

> > -    g_assert(ops != NULL);
> > +    if (ops == NULL) {
> > +        exit(1);
> > +    }
> > +
> 
> 
> Ah, again, why?
> This change looks wrong to me, 
> 
> the ops code should be present when ops interfaces are initialized:
> it should be a code level assertion, as it has to do with the proper order of 
> initializations in QEMU,
> 
> why would we want to do anything else but to assert here?
> 
> Am I blind to something obvious?

Building tcg accel ops modular moves that from coding error to possible
user error (user wants use tcg but has qemu-accel-tcg-$arch.rpm not
installed).

The second part of the patch makes qemu print a message on the failed
module load, so the user would have a chance to figure where the assert
comes from, but replacing the assert with a more friendly message still
makes sense to me.

take care,
  Gerd




reply via email to

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