* [PATCH 1/2] mkfs.ubifs: remove root inode squash feature
@ 2011-07-04 6:59 Artem Bityutskiy
2011-07-04 6:59 ` [PATCH 2/2] mkfs.ubifs: fix a gcc warning Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Artem Bityutskiy @ 2011-07-04 6:59 UTC (permalink / raw)
To: linux-mtd
Remove the -squash-rino-perm mkfs.ubifs option as this was planned. Remove
the corresponding record from the feature-removal-schedule.txt file.
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
---
feature-removal-schedule.txt | 23 -----------------------
mkfs.ubifs/mkfs.ubifs.c | 36 ------------------------------------
2 files changed, 0 insertions(+), 59 deletions(-)
diff --git a/feature-removal-schedule.txt b/feature-removal-schedule.txt
index 69a8155..ca8bb6c 100644
--- a/feature-removal-schedule.txt
+++ b/feature-removal-schedule.txt
@@ -3,26 +3,3 @@ removed in the mtd-utils source tree. Every entry should contain what
exactly is going away, why it is happening, and who is going to be doing
the work. When the feature is removed from the utils, it should also
be removed from this file.
-
----------------------------
-1. Kill --squash-rino-perm and --nosquash-rino-perm parameters of mkfs.ubifs.
-
-Originally, mkfs.ubifs did not have these parameters, and it always set
-permissions for the UBIFS root inode to be {uid=gid=root, u+rwx,go+rx}. This was
-a bug which was found too late, when mkfs.ubifs had already been used in
-production. To fix this bug, 2 new options were introduced:
---squash-rino-perm which preserves the old behavior and --nosquash-rino-perm
-which makes mkfs.ubifs use the right permissions for the root
-inode.
-
-For a while (releases 1.4.0-1.4.3) --squash-rino-perm was the default, and if
-neither --squash-rino-perm nor --nosquash-rino-perm were used,
-mkfs.ubifs printed a warning. This was introduced in mtd-utils-1.4.0 (13 Sep 2010).
-
-Now we have removed a warning and made --nosquash-rino-perm to be the
-default. Also, both options are declared deprecated, so users should try
-to stop using them.
-
-The further step is to remove both of them.
-
----------------------------
diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index 733a3bb..79cc71d 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -110,7 +110,6 @@ static char *output;
static int out_fd;
static int out_ubi;
static int squash_owner;
-static int squash_rino_perm;
/* The 'head' (position) which nodes are written */
static int head_lnum;
@@ -156,8 +155,6 @@ static const struct option longopts[] = {
{"log-lebs", 1, NULL, 'l'},
{"orph-lebs", 1, NULL, 'p'},
{"squash-uids" , 0, NULL, 'U'},
- {"squash-rino-perm", 0, NULL, 'Q'},
- {"nosquash-rino-perm", 0, NULL, 'q'},
{NULL, 0, NULL, 0}
};
@@ -197,15 +194,6 @@ static const char *helptext =
"-V, --version display version information\n"
"-g, --debug=LEVEL display debug information (0 - none, 1 - statistics,\n"
" 2 - files, 3 - more details)\n"
-"-Q, --squash-rino-perm ignore permissions of the FS image directory (the one\n"
-" specified with --root) and make the UBIFS root inode\n"
-" permissions to be {uid=gid=root, u+rwx,go+rx}; this is\n"
-" a legacy compatibility option and it will be removed\n"
-" at some point, do not use it\n"
-"-q, --nosquash-rino-perm for the UBIFS root inode use permissions of the FS\n"
-" image directory (the one specified with --root); this\n"
-" is the default behavior; this option will be removed\n"
-" at some point, do not use it, see clarifications below;\n"
"-h, --help display this help text\n\n"
"Note, SIZE is specified in bytes, but it may also be specified in Kilobytes,\n"
"Megabytes, and Gigabytes if a KiB, MiB, or GiB suffix is used.\n\n"
@@ -217,15 +205,6 @@ static const char *helptext =
"or more percent better than \"lzo\", mkfs.ubifs chooses \"lzo\", otherwise it chooses\n"
"\"zlib\". The \"--favor-percent\" may specify arbitrary threshold instead of the\n"
"default 20%.\n\n"
-"The -R parameter specifies amount of bytes reserved for the super-user.\n\n"
-"Some clarifications about --squash-rino-perm and --nosquash-rino-perm options.\n"
-"Originally, mkfs.ubifs did not have them, and it always set permissions for the UBIFS\n"
-"root inode to be {uid=gid=root, u+rwx,go+rx}. This was a bug which was found too\n"
-"late, when mkfs.ubifs had already been used in production. To fix this bug, 2 new\n"
-"options were introduced: --squash-rino-perm which preserves the old behavior and\n"
-"--nosquash-rino-perm which makes mkfs.ubifs use the right permissions for the root\n"
-"inode. Now these options are considered depricated and they will be removed later, so\n"
-"do not use them.\n\n"
"The -F parameter is used to set the \"fix up free space\" flag in the superblock,\n"
"which forces UBIFS to \"fixup\" all the free space which it is going to use. This\n"
"option is useful to work-around the problem of double free space programming: if the\n"
@@ -674,13 +653,6 @@ static int get_options(int argc, char**argv)
case 'U':
squash_owner = 1;
break;
- case 'Q':
- squash_rino_perm = 1;
- printf("WARNING: --squash-rino-perm is depricated, do not use it\n");
- break;
- case 'q':
- printf("WARNING: --nosquash-rino-perm is depricated, do not use it\n");
- break;
}
}
@@ -709,10 +681,6 @@ static int get_options(int argc, char**argv)
return err_msg("Maximum count of LEBs was not specified "
"(use -h for help)");
- if (squash_rino_perm != -1 && !root)
- return err_msg("--squash-rino-perm and nosquash-rino-perm options "
- "can be used only with the --root option");
-
if (c->max_bud_bytes == -1) {
int lebs;
@@ -1682,10 +1650,6 @@ static int write_data(void)
if (err)
return sys_err_msg("bad root file-system directory '%s'",
root);
- if (squash_rino_perm) {
- root_st.st_uid = root_st.st_gid = 0;
- root_st.st_mode = mode;
- }
} else {
root_st.st_mtime = time(NULL);
root_st.st_atime = root_st.st_ctime = root_st.st_mtime;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] mkfs.ubifs: fix a gcc warning
2011-07-04 6:59 [PATCH 1/2] mkfs.ubifs: remove root inode squash feature Artem Bityutskiy
@ 2011-07-04 6:59 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2011-07-04 6:59 UTC (permalink / raw)
To: linux-mtd
This patch "fixes" the following gcc warning:
mkfs.ubifs/mkfs.ubifs.c: In function ‘main’:
mkfs.ubifs/ubifs.h:420:2: warning: ‘child_cnt’ may be used uninitialized in this function [-Wuninitialized]
mkfs.ubifs/mkfs.ubifs.c:1735:6: note: ‘child_cnt’ was declared here
by initializing the ‘child_cnt’ to zero.
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
---
mkfs.ubifs/mkfs.ubifs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index 79cc71d..dcdb722 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -1732,7 +1732,7 @@ static int write_index(void)
struct idx_entry **idx_ptr, **p;
struct ubifs_idx_node *idx;
struct ubifs_branch *br;
- int child_cnt, j, level, blnum, boffs, blen, blast_len, err;
+ int child_cnt = 0, j, level, blnum, boffs, blen, blast_len, err;
dbg_msg(1, "leaf node count: %zd", idx_cnt);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-04 6:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-04 6:59 [PATCH 1/2] mkfs.ubifs: remove root inode squash feature Artem Bityutskiy
2011-07-04 6:59 ` [PATCH 2/2] mkfs.ubifs: fix a gcc warning Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).