qemu-devel
[Top][All Lists]
Advanced

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

qemu-pr-helper -v suppresses errors, isn't that weird?


From: Markus Armbruster
Subject: qemu-pr-helper -v suppresses errors, isn't that weird?
Date: Thu, 18 Jun 2020 07:32:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

prh_co_entry() reports reports errors reading requests / writing
responses only when @verbose (command line -v); relevant code appended
for you convenience.

Sure these are *errors*?  The program recovers and continues, and this
is deemed normal enough to inform the user only when he specifically
asks for it.  Yet when we inform, we format it as an error.  Should we
tune it down to warnings?


static void coroutine_fn prh_co_entry(void *opaque)
{
    [...]
    while (atomic_read(&state) == RUNNING) {
        [...]
        sz = prh_read_request(client, &req, &resp, &local_err);
        if (sz < 0) {
            break;
        }
        [...]
        if (prh_write_response(client, &req, &resp, &local_err) < 0) {
            break;
        }
    }
    if (local_err) {
        if (verbose == 0) {
            error_free(local_err);
        } else {
            error_report_err(local_err);
        }
    }

out:
    qio_channel_detach_aio_context(QIO_CHANNEL(client->ioc));
    object_unref(OBJECT(client->ioc));
    g_free(client);
}




reply via email to

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