[PATCH v2 3/5] qemu_passt: Make passt report errors to stderr whenever possible

Michal Prívozník mprivozn at redhat.com
Thu Feb 16 16:21:48 UTC 2023


On 2/16/23 16:42, Jonathon Jongsma wrote:
> On 2/16/23 7:32 AM, Michal Privoznik wrote:
>> Passt has '--stderr' argument which makes it report error onto
>> stderr rather to system log. Unfortunately, it's currently
>> impossible to use both '--log-file' and '--stderr', so pass the
>> latter only if the former isn't passed. Then, use the stderr to
>> produce more user friendly error message on failed start.
>>
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>>   src/qemu/qemu_passt.c | 22 +++++++++++++++++++---
>>   1 file changed, 19 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c
>> index c082c149cd..881205449b 100644
>> --- a/src/qemu/qemu_passt.c
>> +++ b/src/qemu/qemu_passt.c
>> @@ -171,8 +171,13 @@ qemuPasstStart(virDomainObj *vm,
>>       if (net->sourceDev)
>>           virCommandAddArgList(cmd, "--interface", net->sourceDev, NULL);
>>   -    if (net->backend.logFile)
>> +    if (net->backend.logFile) {
>>           virCommandAddArgList(cmd, "--log-file",
>> net->backend.logFile, NULL);
>> +    } else {
>> +        /* By default, passt logs into system logger. But we are
>> interested
>> +         * into errors too. Make it print errors onto stderr. */
> 
> s/into/in the/ ?

Honestly, I have no idea. I'm not a native speaker. Maybe it's 'print
onto paper' but 'print into a stream'?

Anyway, fixed locally. Thanks.

Michal



More information about the libvir-list mailing list