[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/6] vhost-user-server: fix VHOST_MEMORY_MAX_REGIONS compiler err
From: |
Stefan Hajnoczi |
Subject: |
[PATCH 1/6] vhost-user-server: fix VHOST_MEMORY_MAX_REGIONS compiler error |
Date: |
Fri, 19 Jun 2020 13:00:41 +0100 |
Commit b650d5f4b1cd3f9f8c4fdb319838c5c1e0695e41 ("Lift max ram slots
limit in libvhost-user") renamed this constant. Use the array size
instead of hard-coding a particular constant in the error message.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
util/vhost-user-server.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c
index 393beeb6b9..e94a8d8a83 100644
--- a/util/vhost-user-server.c
+++ b/util/vhost-user-server.c
@@ -137,9 +137,9 @@ vu_message_read(VuDev *vu_dev, int conn_fd, VhostUserMsg
*vmsg)
read_bytes += rc;
if (nfds_t > 0) {
if (nfds + nfds_t > G_N_ELEMENTS(vmsg->fds)) {
- error_report("A maximum of %d fds are allowed, "
+ error_report("A maximum of %zu fds are allowed, "
"however got %lu fds now",
- VHOST_MEMORY_MAX_NREGIONS, nfds + nfds_t);
+ G_N_ELEMENTS(vmsg->fds), nfds + nfds_t);
goto fail;
}
memcpy(vmsg->fds + nfds, fds_t,
--
2.26.2
- [PATCH v9 0/5] vhost-user block device backend implementation, Coiby Xu, 2020/06/14
- [PATCH v9 1/5] Allow vu_message_read to be replaced, Coiby Xu, 2020/06/14
- [PATCH v9 2/5] generic vhost user server, Coiby Xu, 2020/06/14
- Re: [PATCH v9 2/5] generic vhost user server, Kevin Wolf, 2020/06/18
- [PATCH 1/6] vhost-user-server: fix VHOST_MEMORY_MAX_REGIONS compiler error,
Stefan Hajnoczi <=
- [PATCH 3/6] vhost-user-server: adjust vhost_user_server_set_aio_context() arguments, Stefan Hajnoczi, 2020/06/19
- [PATCH 2/6] vhost-user-server: drop unused #include <eventfd.h>, Stefan Hajnoczi, 2020/06/19
- [PATCH 5/6] vhost-user-server: fix s/initialized/initialize/ typo, Stefan Hajnoczi, 2020/06/19
- [PATCH 6/6] vhost-user-server: use DevicePanicNotifierFn everywhere, Stefan Hajnoczi, 2020/06/19
- [PATCH 4/6] vhost-user-server: mark fd handlers "external", Stefan Hajnoczi, 2020/06/19
- Re: [PATCH v9 2/5] generic vhost user server, Stefan Hajnoczi, 2020/06/19
- [PATCH v9 3/5] move logical block size check function to a common utility function, Coiby Xu, 2020/06/14