diff options
Diffstat (limited to 'samples')
-rw-r--r-- | samples/gpio-pci-idio-16.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/samples/gpio-pci-idio-16.c b/samples/gpio-pci-idio-16.c index beb1bd1..cf44ab9 100644 --- a/samples/gpio-pci-idio-16.c +++ b/samples/gpio-pci-idio-16.c @@ -51,6 +51,8 @@ bar2_access(void *pvt, char * const buf, size_t count, loff_t offset, int main(int argc, char **argv) { + int err; + lm_dev_info_t dev_info = { .pci_info = { .id = {.vid = 0x494F, .did = 0x0DC8 }, @@ -64,7 +66,11 @@ int main(int argc, char **argv) .uuid = argv[1], }; - return lm_ctx_run(&dev_info); + err = lm_ctx_run(&dev_info); + if (err != 0) { + fprintf(stderr, "failed to realize device emulation: %m\n"); + } + return err; } /* ex: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab: */ |