diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2020-10-22 07:02:26 -0400 |
---|---|---|
committer | Thanos Makatos <thanos.makatos@nutanix.com> | 2020-10-22 11:11:37 -0400 |
commit | 7a6978abc95e62424e3f5a8cea5f78fd4ef8056c (patch) | |
tree | b204fe57260a3409f4ea99a74d70fc6d483a27fe /samples | |
parent | 7b8b3a6b8d0d4fccfe5ba9717fec8b5db3f77df4 (diff) | |
download | libvfio-user-7a6978abc95e62424e3f5a8cea5f78fd4ef8056c.zip libvfio-user-7a6978abc95e62424e3f5a8cea5f78fd4ef8056c.tar.gz libvfio-user-7a6978abc95e62424e3f5a8cea5f78fd4ef8056c.tar.bz2 |
samples/server: don't use err(3) if errno hasn't been set
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/server.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/samples/server.c b/samples/server.c index be3edfd..8d30c06 100644 --- a/samples/server.c +++ b/samples/server.c @@ -209,12 +209,14 @@ int main(int argc, char *argv[]) verbose = true; break; default: /* '?' */ - err(EXIT_FAILURE, "Usage: %s [-d] <IOMMU group>\n", argv[0]); + fprintf(stderr, "Usage: %s [-d] <IOMMU group>\n", argv[0]); + exit(EXIT_FAILURE); } } if (optind >= argc) { - err(EXIT_FAILURE, "missing MUSER device UUID"); + fprintf(stderr, "missing MUSER device UUID\n"); + exit(EXIT_FAILURE); } server_data.bar1 = malloc(sysconf(_SC_PAGESIZE)); |