From 943fe77b8099d4a9c5423320dc471a4ac14c634b Mon Sep 17 00:00:00 2001 From: John Levon Date: Tue, 17 Nov 2020 11:39:59 +0000 Subject: small cleanups post-muser.ko removal --- samples/gpio-pci-idio-16.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'samples/gpio-pci-idio-16.c') 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] \n", argv[0]); + fprintf(stderr, "Usage: %s [-v] \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 = { -- cgit v1.1