X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Foptions.c;fp=fish%2Foptions.c;h=43a15e49ab95abf4ebdd0f4e08d076bdac69afe7;hp=436e10d8d79865a09047b21d3e22cf968159a0f6;hb=4e529e06a4500959cd783f5029354fea47a253a6;hpb=feaddb062afcab9117215b4c2188f63d8b647b99 diff --git a/fish/options.c b/fish/options.c index 436e10d..43a15e4 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. */