[PATCH] uml: fix mknod
Fix UML hostfs mknod(): userspace has differernt dev_t size and encoding than kernel, so extract major/minor and reencode using glibc makedev() macro. Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
7a238fcba0
commit
88f6cd0c3b
@@ -295,11 +295,11 @@ int do_rmdir(const char *file)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int do_mknod(const char *file, int mode, int dev)
|
||||
int do_mknod(const char *file, int mode, unsigned int major, unsigned int minor)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = mknod(file, mode, dev);
|
||||
err = mknod(file, mode, makedev(major, minor));
|
||||
if(err) return(-errno);
|
||||
return(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user