Patchwork mkfs.ubifs: use gid from table instead 2x uid

login
register
mail settings
Submitter Sebastian Siewior
Date Aug. 22, 2014, 4:49 p.m.
Message ID <1408726141-25608-1-git-send-email-bigeasy@linutronix.de>
Download mbox | patch
Permalink /patch/382300/
State New
Headers show

Comments

Sebastian Siewior - Aug. 22, 2014, 4:49 p.m.
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@linutronix.de>
---
 mkfs.ubifs/mkfs.ubifs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

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;