[PATCH] mkfs.ubifs: use gid from table instead 2x uid

Sebastian Andrzej Siewior bigeasy at linutronix.de
Fri Aug 22 09:49:01 PDT 2014


If the devtable is used then the tool uses uid twice and doesn't
consider gid at all. This changes it to use gid & uid.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
---
 mkfs.ubifs/mkfs.ubifs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index 200c8a5..d7a252c 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -1535,7 +1535,7 @@ static int add_directory(const char *dir_name, ino_t dir_inum, struct stat *st,
 
 		memcpy(&fake_st, &root_st, sizeof(struct stat));
 		fake_st.st_uid  = nh_elt->uid;
-		fake_st.st_uid  = nh_elt->uid;
+		fake_st.st_gid  = nh_elt->gid;
 		fake_st.st_mode = nh_elt->mode;
 		fake_st.st_rdev = nh_elt->dev;
 		fake_st.st_nlink = 1;
-- 
2.1.0




More information about the linux-mtd mailing list