diff options
Diffstat (limited to 'samples/null.c')
-rw-r--r-- | samples/null.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/samples/null.c b/samples/null.c index fda260e..7944e30 100644 --- a/samples/null.c +++ b/samples/null.c @@ -62,6 +62,16 @@ static void* null_drive(void *arg) fprintf(stderr, "failed to enable cancel type: %s\n", strerror(ret)); return NULL; } + ret = vfu_realize_ctx(vfu_ctx); + if (ret < 0) { + fprintf(stderr, "failed to realize device\n"); + return NULL; + } + ret = vfu_attach_ctx(vfu_ctx); + if (ret < 0) { + fprintf(stderr, "failed to attach device\n"); + return NULL; + } printf("starting device emulation\n"); vfu_ctx_drive(vfu_ctx); return NULL; |