aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/muser.h1
-rw-r--r--lib/muser_ctx.c2
-rw-r--r--samples/gpio-pci-idio-16.c13
-rw-r--r--samples/null.c2
-rw-r--r--samples/server.c5
5 files changed, 9 insertions, 14 deletions
diff --git a/lib/muser.h b/lib/muser.h
index 79d5559..59bc8de 100644
--- a/lib/muser.h
+++ b/lib/muser.h
@@ -248,7 +248,6 @@ typedef union {
} lm_cap_t;
typedef enum {
- LM_TRANS_KERNEL,
LM_TRANS_SOCK,
LM_TRANS_MAX
} lm_trans_t;
diff --git a/lib/muser_ctx.c b/lib/muser_ctx.c
index a9a6bdb..1a9b86d 100644
--- a/lib/muser_ctx.c
+++ b/lib/muser_ctx.c
@@ -2481,7 +2481,7 @@ lm_ctx_create(const lm_dev_info_t *dev_info)
}
if (dev_info->trans != LM_TRANS_SOCK) {
- errno = EINVAL;
+ errno = ENOTSUP;
return NULL;
}
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 = {
diff --git a/samples/null.c b/samples/null.c
index 2a16bf7..0253d05 100644
--- a/samples/null.c
+++ b/samples/null.c
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
pthread_t thread;
if (argc != 2) {
- err(EXIT_FAILURE, "missing MUSER device UUID");
+ errx(EXIT_FAILURE, "missing MUSER socket path");
}
lm_dev_info_t dev_info = {.uuid = argv[1], .log = null_log, .log_lvl = LM_DBG };
diff --git a/samples/server.c b/samples/server.c
index 5e3c89e..c814c2e 100644
--- a/samples/server.c
+++ b/samples/server.c
@@ -299,14 +299,13 @@ int main(int argc, char *argv[]){
verbose = true;
break;
default: /* '?' */
- fprintf(stderr, "Usage: %s [-d] <IOMMU group>\n", argv[0]);
+ fprintf(stderr, "Usage: %s [-v] <socketpath>\n", argv[0]);
exit(EXIT_FAILURE);
}
}
if (optind >= argc) {
- fprintf(stderr, "missing MUSER device UUID\n");
- exit(EXIT_FAILURE);
+ errx(EXIT_FAILURE, "missing MUSER socket path");
}
server_data.bar1 = malloc(sysconf(_SC_PAGESIZE));