Hi @tech,
I recently realized that the word "rdonly" is not an alias for "ro" in
the fstab file, which is inconsistent with the mount(1) command. I would
suggest to add support for it with this small patch.
Index: fstab.c
===================================================================
RCS file: /cvs/src/lib/libc/gen/fstab.c,v
retrieving revision 1.22
diff -u -p -u -r1.22 fstab.c
--- fstab.c 17 Mar 2016 23:48:42 -0000 1.22
+++ fstab.c 14 Jun 2017 17:53:24 -0000
@@ -116,8 +116,6 @@ fstabscan(void)
strlcpy(subline, _fs_fstab.fs_mntops, sizeof subline);
for (typexx = 0, cp = strtok_r(subline, ",", &last); cp;
cp = strtok_r(NULL, ",", &last)) {
- if (strlen(cp) != 2)
- continue;
if (!strcmp(cp, FSTAB_RW)) {
_fs_fstab.fs_type = FSTAB_RW;
break;
@@ -127,6 +125,10 @@ fstabscan(void)
break;
}
if (!strcmp(cp, FSTAB_RO)) {
+ _fs_fstab.fs_type = FSTAB_RO;
+ break;
+ }
+ if (!strcmp(cp, FSTAB_RDONLY)) {
_fs_fstab.fs_type = FSTAB_RO;
break;
}
Kind regards,
Jérôme FRGACIC