aboutsummaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2018-11-09 10:45:27 +0000
committerNikolaus Rath <Nikolaus@rath.org>2018-11-09 10:45:27 +0000
commit30415af0dc538f7b7e864773230c2bb74d28f985 (patch)
tree86194fd9aef8191f6f1b37d0ba091bf0aa0eae35 /example
parent3e2fcf3a630e575bc420df254525834504dc01b7 (diff)
downloadlibfuse-30415af0dc538f7b7e864773230c2bb74d28f985.tar.gz
Don't crash if mountpoint is not specified.
Fixes: #319.
Diffstat (limited to 'example')
-rw-r--r--example/passthrough_ll.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c
index db4a3f3..4091395 100644
--- a/example/passthrough_ll.c
+++ b/example/passthrough_ll.c
@@ -1189,6 +1189,13 @@ int main(int argc, char *argv[])
goto err_out1;
}
+ if(opts.mountpoint == NULL) {
+ printf("usage: %s [options] <mountpoint>\n", argv[0]);
+ printf(" %s --help\n", argv[0]);
+ ret = 1;
+ goto err_out1;
+ }
+
if (fuse_opt_parse(&args, &lo, lo_opts, NULL)== -1)
return 1;