summaryrefslogtreecommitdiffstats
path: root/fish/options.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-03-28 13:35:53 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-03-28 14:21:55 +0100
commit4e529e06a4500959cd783f5029354fea47a253a6 (patch)
treefb90342de254f3188e56a8c412d991e7ae3eab6d /fish/options.c
parentfeaddb062afcab9117215b4c2188f63d8b647b99 (diff)
downloadlibguestfs-4e529e06a4500959cd783f5029354fea47a253a6.tar.gz
libguestfs-4e529e06a4500959cd783f5029354fea47a253a6.tar.xz
libguestfs-4e529e06a4500959cd783f5029354fea47a253a6.zip
fish: fuse: Add -m dev:mnt:opts to allow mount options to be specified.
This lets you turn on ACLs and xattrs by doing: -m /dev/sda1:/:acl,user_xattr The extra parameter is passed through to mount_options: libguestfs: trace: mount_options "acl,user_xattr" "/dev/sda1" "/"
Notes
Notes: Labels: feature
Diffstat (limited to 'fish/options.c')
-rw-r--r--fish/options.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fish/options.c b/fish/options.c
index 436e10d8..43a15e49 100644
--- a/fish/options.c
+++ b/fish/options.c
@@ -1,5 +1,5 @@
/* libguestfs - guestfish and guestmount shared option parsing
- * Copyright (C) 2010 Red Hat Inc.
+ * Copyright (C) 2010-2011 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -106,11 +106,18 @@ mount_mps (struct mp *mp)
if (mp) {
mount_mps (mp->next);
+ const char *options;
+ if (mp->options)
+ options = mp->options;
+ else if (read_only)
+ options = "ro";
+ else
+ options = "";
+
/* Don't use guestfs_mount here because that will default to mount
* options -o sync,noatime. For more information, see guestfs(3)
* section "LIBGUESTFS GOTCHAS".
*/
- const char *options = read_only ? "ro" : "";
r = guestfs_mount_options (g, options, mp->device, mp->mountpoint);
if (r == -1) {
/* Display possible mountpoints before exiting. */