--- a/mkfs.ubifs/mkfs.ubifs.c +++ b/mkfs.ubifs/mkfs.ubifs.c @@ -109,7 +109,7 @@ static char *output; static int out_fd; static int out_ubi; static int squash_owner; -static int squash_rino_perm; +static int squash_rino_perm = -1; /* The 'head' (position) which nodes are written */ static int head_lnum; @@ -683,6 +683,7 @@ static int get_options(int argc, char**a printf("WARNING: --squash-rino-perm is depricated, do not use it\n"); break; case 'q': + squash_rino_perm = 0; printf("WARNING: --nosquash-rino-perm is depricated, do not use it\n"); break; } @@ -1686,7 +1687,7 @@ static int write_data(void) if (err) return sys_err_msg("bad root file-system directory '%s'", root); - if (squash_rino_perm) { + if (squash_rino_perm > 0) { root_st.st_uid = root_st.st_gid = 0; root_st.st_mode = mode; }