When mounting a ro fs rw, print warning and then mount it ro. Patch
from Dave Cinege. -Erik
This commit is contained in:
parent
b938e2ff99
commit
0cccdfaf36
4
mount.c
4
mount.c
@ -144,6 +144,10 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
|
||||
}
|
||||
#endif
|
||||
status = mount(specialfile, dir, filesystemtype, flags, string_flags);
|
||||
if (errno == EROFS) {
|
||||
errorMsg("%s is write-protected, mounting read-only\n", specialfile);
|
||||
status = mount(specialfile, dir, filesystemtype, flags |= MS_RDONLY, string_flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -144,6 +144,10 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
|
||||
}
|
||||
#endif
|
||||
status = mount(specialfile, dir, filesystemtype, flags, string_flags);
|
||||
if (errno == EROFS) {
|
||||
errorMsg("%s is write-protected, mounting read-only\n", specialfile);
|
||||
status = mount(specialfile, dir, filesystemtype, flags |= MS_RDONLY, string_flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user