summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-11-08 16:01:44 +0100
committerGravatar Matt Colyer2009-11-09 07:45:06 -0800
commit1bc3778465a4a1d5b6233d4d246c4bc7be528c86 (patch)
treef39f8049506378cb68f66d95a53612808264d3ee /src
parent429df523678c01ed1ff39c3d6eed88d4e11bf3c4 (diff)
downloadifuse-1bc3778465a4a1d5b6233d4d246c4bc7be528c86.tar.gz
ifuse-1bc3778465a4a1d5b6233d4d246c4bc7be528c86.tar.bz2
Fix handling of uuid command line argument
Signed-off-by: Matt Colyer <matt@colyer.name> [#83 state:resolved]
Diffstat (limited to 'src')
-rw-r--r--src/ifuse.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ifuse.c b/src/ifuse.c
index 2570760..a0a20da 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -59,6 +59,7 @@ enum {
KEY_VERSION,
KEY_ROOT,
KEY_UUID,
+ KEY_UUID_LONG,
KEY_DEBUG
};
@@ -67,7 +68,8 @@ static struct fuse_opt ifuse_opts[] = {
FUSE_OPT_KEY("--version", KEY_VERSION),
FUSE_OPT_KEY("-h", KEY_HELP),
FUSE_OPT_KEY("--help", KEY_HELP),
- FUSE_OPT_KEY("--uuid=", KEY_UUID),
+ FUSE_OPT_KEY("-u %s", KEY_UUID),
+ FUSE_OPT_KEY("--uuid %s", KEY_UUID_LONG),
FUSE_OPT_KEY("--root", KEY_ROOT),
FUSE_OPT_KEY("--debug", KEY_DEBUG),
FUSE_OPT_END
@@ -617,8 +619,12 @@ static int ifuse_opt_proc(void *data, const char *arg, int key, struct fuse_args
int res = 1;
switch (key) {
+ case KEY_UUID_LONG:
+ opts.device_uuid = strdup(arg+6);
+ res = 0;
+ break;
case KEY_UUID:
- opts.device_uuid = strdup(arg+7);
+ opts.device_uuid = strdup(arg+2);
res = 0;
break;
case KEY_DEBUG: