X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.c;h=32d6f9f1d1b4ab75b30e18c1f8c8e9fc451a5c99;hb=ebfcb7f23df4546977628dc718982730682a68c0;hp=7dae815daa8082455edb606986338b4fe52c4fa0;hpb=4d45c45f0928c7791429d351dc69b75167888f7d;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index 7dae815..32d6f9f 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -139,6 +139,10 @@ main (int argc, char *argv[]) atexit (close_stdout); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEBASEDIR); + textdomain (PACKAGE); + enum { HELP_OPTION = CHAR_MAX + 1 }; static const char *options = "a:Df:h::im:nrv?Vx"; @@ -470,10 +474,13 @@ mount_mps (struct mp *mp) if (mp) { mount_mps (mp->next); - if (!read_only) - r = guestfs_mount (g, mp->device, mp->mountpoint); - else - r = guestfs_mount_ro (g, mp->device, mp->mountpoint); + + /* 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) exit (EXIT_FAILURE); }