[packages] libcrypt update to 1.5.3
[packages.git] / utils / mtd-utils / patches / 136-mkubifs-fix-rinoperm-options.patch
1 --- a/mkfs.ubifs/mkfs.ubifs.c
2 +++ b/mkfs.ubifs/mkfs.ubifs.c
3 @@ -109,7 +109,7 @@ static char *output;
4  static int out_fd;
5  static int out_ubi;
6  static int squash_owner;
7 -static int squash_rino_perm;
8 +static int squash_rino_perm = -1;
9  
10  /* The 'head' (position) which nodes are written */
11  static int head_lnum;
12 @@ -683,6 +683,7 @@ static int get_options(int argc, char**a
13                         printf("WARNING: --squash-rino-perm is depricated, do not use it\n");
14                         break;
15                 case 'q':
16 +                       squash_rino_perm = 0;
17                         printf("WARNING: --nosquash-rino-perm is depricated, do not use it\n");
18                         break;
19                 }
20 @@ -1686,7 +1687,7 @@ static int write_data(void)
21                 if (err)
22                         return sys_err_msg("bad root file-system directory '%s'",
23                                            root);
24 -               if (squash_rino_perm) {
25 +               if (squash_rino_perm > 0) {
26                         root_st.st_uid = root_st.st_gid = 0;
27                         root_st.st_mode = mode;
28                 }