diff options
Diffstat (limited to 'fish/options.c')
-rw-r--r-- | fish/options.c | 11 |
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. */ |