source: npl/system/klibc/patches/mount-implement-o-defaults.patch @ f9ce31e

perl-5.22
Last change on this file since f9ce31e was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 778 bytes
  • usr/utils/mount_opts.c

    From: Ben Hutchings <ben@decadent.org.uk>
    Date: Sat, 4 Oct 2014 16:32:39 +0100
    Subject: mount: Implement -o defaults
    Bug-Debian: https://bugs.debian.org/763049
    Forwarded: http://www.zytor.com/pipermail/klibc/2016-January/003887.html
    
    This is needed to support mounting non-root filesystems in
    initramfs-tools.
    
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    a b parse_mount_options(char *arg, unsigned 
    8989                                break;
    9090                }
    9191
    92                 if (res != 0 && s[0])
    93                         add_extra_option(extra, opt);
     92                if (res != 0 && s[0]) {
     93                        if (!strcmp(opt, "defaults"))
     94                                rwflag &= ~(MS_RDONLY|MS_NOSUID|MS_NODEV|
     95                                            MS_NOEXEC|MS_SYNCHRONOUS);
     96                        else
     97                                add_extra_option(extra, opt);
     98                }
    9499        }
    95100
    96101        return rwflag;
Note: See TracBrowser for help on using the repository browser.