losetup: implement -r option. Closes 4033.
function old new delta packed_usage 28595 28633 +38 losetup_main 285 290 +5 singlemount 906 908 +2 set_loop 674 672 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -1809,7 +1809,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
|
||||
if (ENABLE_FEATURE_MOUNT_LOOP && S_ISREG(st.st_mode)) {
|
||||
loopFile = bb_simplify_path(mp->mnt_fsname);
|
||||
mp->mnt_fsname = NULL; // will receive malloced loop dev name
|
||||
if (set_loop(&mp->mnt_fsname, loopFile, 0) < 0) {
|
||||
if (set_loop(&mp->mnt_fsname, loopFile, 0, /*ro:*/ 0) < 0) {
|
||||
if (errno == EPERM || errno == EACCES)
|
||||
bb_error_msg(bb_msg_perm_denied_are_you_root);
|
||||
else
|
||||
|
Reference in New Issue
Block a user