diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-10-29 10:32:44 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2020-11-03 19:06:20 +0000 |
commit | 58ad6ae0cbad626bd574bc1347f210a35a8316eb (patch) | |
tree | ef5cd3ab0db65763aae4814bfab0e4404a6261ba /block | |
parent | 8526e39e9974228f937d04e8eae140add8b17b43 (diff) | |
download | qemu-58ad6ae0cbad626bd574bc1347f210a35a8316eb.zip qemu-58ad6ae0cbad626bd574bc1347f210a35a8316eb.tar.gz qemu-58ad6ae0cbad626bd574bc1347f210a35a8316eb.tar.bz2 |
block/nvme: Report warning with warn_report()
Instead of displaying warning on stderr, use warn_report()
which also displays it on the monitor.
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20201029093306.1063879-4-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/nvme.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/nvme.c b/block/nvme.c index 739a0a7..6f1d7f9 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -399,8 +399,8 @@ static bool nvme_process_completion(NVMeQueuePair *q) } cid = le16_to_cpu(c->cid); if (cid == 0 || cid > NVME_QUEUE_SIZE) { - fprintf(stderr, "Unexpected CID in completion queue: %" PRIu32 "\n", - cid); + warn_report("NVMe: Unexpected CID in completion queue: %"PRIu32", " + "queue size: %u", cid, NVME_QUEUE_SIZE); continue; } trace_nvme_complete_command(s, q->index, cid); |