diff options
author | John Levon <john.levon@nutanix.com> | 2020-11-17 11:39:59 +0000 |
---|---|---|
committer | John Levon <levon@movementarian.org> | 2020-11-18 10:30:51 +0000 |
commit | 943fe77b8099d4a9c5423320dc471a4ac14c634b (patch) | |
tree | 7d2b754348633f614ea0fe4b67e0e25bae1aa1b6 /samples/gpio-pci-idio-16.c | |
parent | 7085f28d6596dc12d82ea4386d106e340490d3fe (diff) | |
download | libvfio-user-943fe77b8099d4a9c5423320dc471a4ac14c634b.zip libvfio-user-943fe77b8099d4a9c5423320dc471a4ac14c634b.tar.gz libvfio-user-943fe77b8099d4a9c5423320dc471a4ac14c634b.tar.bz2 |
small cleanups post-muser.ko removal
Diffstat (limited to 'samples/gpio-pci-idio-16.c')
-rw-r--r-- | samples/gpio-pci-idio-16.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/samples/gpio-pci-idio-16.c b/samples/gpio-pci-idio-16.c index d9bfa0e..3e47fc9 100644 --- a/samples/gpio-pci-idio-16.c +++ b/samples/gpio-pci-idio-16.c @@ -69,31 +69,28 @@ static void _sa_handler(UNUSED int signum) int main(int argc, char *argv[]) { int ret; - bool trans_sock = false, verbose = false; + bool verbose = false; char opt; struct sigaction act = {.sa_handler = _sa_handler}; lm_ctx_t *lm_ctx; - while ((opt = getopt(argc, argv, "sv")) != -1) { + while ((opt = getopt(argc, argv, "v")) != -1) { switch (opt) { - case 's': - trans_sock = true; - break; case 'v': verbose = true; break; default: /* '?' */ - fprintf(stderr, "Usage: %s [-s] [-d] <IOMMU group>\n", argv[0]); + fprintf(stderr, "Usage: %s [-v] <socketpath>\n", argv[0]); exit(EXIT_FAILURE); } } if (optind >= argc) { - err(EXIT_FAILURE, "missing MUSER device UUID"); + errx(EXIT_FAILURE, "missing MUSER socket path"); } lm_dev_info_t dev_info = { - .trans = trans_sock ? LM_TRANS_SOCK : LM_TRANS_KERNEL, + .trans = LM_TRANS_SOCK, .log = verbose ? _log : NULL, .log_lvl = LM_DBG, .pci_info = { |