diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-10-18 19:15:57 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-10-18 19:15:57 +0000 |
commit | f9dde919d6ff592777c6b268d9c96d4214a9e711 (patch) | |
tree | 301bcad8c22780a074173eb067b6544f4cde50a0 /util-linux/mount.c | |
parent | 1dfeeeb65137fe9af27faaf844ba98e1b3bc9c12 (diff) |
mount: -o parm1 -o parm2 should accumulate
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r-- | util-linux/mount.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index 4cc1d4bee..313521aa0 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -1754,7 +1754,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv) char *cmdopts = xstrdup(""); char *fstype = NULL; char *storage_path; - char *opt_o; + llist_t *lst_o = NULL; const char *fstabname; FILE *fstab; int i, j, rc = 0; @@ -1776,10 +1776,10 @@ int mount_main(int argc UNUSED_PARAM, char **argv) // Parse remaining options // Max 2 params; -v is a counter - opt_complementary = "?2" USE_FEATURE_MOUNT_VERBOSE(":vv"); - opt = getopt32(argv, OPTION_STR, &opt_o, &fstype + opt_complementary = "?2o::" USE_FEATURE_MOUNT_VERBOSE(":vv"); + opt = getopt32(argv, OPTION_STR, &lst_o, &fstype USE_FEATURE_MOUNT_VERBOSE(, &verbose)); - if (opt & OPT_o) append_mount_options(&cmdopts, opt_o); // -o + while (lst_o) append_mount_options(&cmdopts, llist_pop(&lst_o)); // -o if (opt & OPT_r) append_mount_options(&cmdopts, "ro"); // -r if (opt & OPT_w) append_mount_options(&cmdopts, "rw"); // -w argv += optind; |