projects
/
klibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83db756
)
mount: Implement -o defaults
author
Ben Hutchings
<ben@decadent.org.uk>
Sat, 4 Oct 2014 15:32:39 +0000
(16:32 +0100)
committer
Ben Hutchings
<ben@decadent.org.uk>
Sat, 30 Dec 2017 22:09:36 +0000
(22:09 +0000)
This is needed to support mounting non-root filesystems in
initramfs-tools.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name mount-implement-o-defaults.patch
usr/utils/mount_opts.c
patch
|
blob
|
history
diff --git
a/usr/utils/mount_opts.c
b/usr/utils/mount_opts.c
index 05d1729abdc3b8b54d026ff8532463af45ed187e..bb26c7d08005a8dd5a81faa84fd47f2d61630043 100644
(file)
--- a/
usr/utils/mount_opts.c
+++ b/
usr/utils/mount_opts.c
@@
-89,8
+89,13
@@
parse_mount_options(char *arg, unsigned long rwflag, struct extra_opts *extra)
break;
}
- if (res != 0 && s[0])
- add_extra_option(extra, opt);
+ if (res != 0 && s[0]) {
+ if (!strcmp(opt, "defaults"))
+ rwflag &= ~(MS_RDONLY|MS_NOSUID|MS_NODEV|
+ MS_NOEXEC|MS_SYNCHRONOUS);
+ else
+ add_extra_option(extra, opt);
+ }
}
return rwflag;