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

Brian Norris computersforpeace at gmail.com
Wed Dec 9 16:05:08 PST 2015


With the archaeology hat on...

On Fri, Aug 22, 2014 at 06:49:01PM +0200, Sebastian Andrzej Siewior wrote:
> 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;

LGTM. Applied to mtd-utils.git



More information about the linux-mtd mailing list