diff options
author | Johannes Stezenbach <js@linuxtv.org> | 2007-01-29 16:19:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 11:26:44 -0500 |
commit | 88f6cd0c3bb5db2619103f834d4167b7d0d9899c (patch) | |
tree | 06ee040a40e749dc1bf2fed61201db9d2a4d0356 /fs/hostfs/hostfs_user.c | |
parent | 7a238fcba0629b6f2edbcd37458bae56fcf36be5 (diff) |
[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>
Diffstat (limited to 'fs/hostfs/hostfs_user.c')
-rw-r--r-- | fs/hostfs/hostfs_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c index 23b7cee72123..1ed5ea389f15 100644 --- a/fs/hostfs/hostfs_user.c +++ b/fs/hostfs/hostfs_user.c | |||
@@ -295,11 +295,11 @@ int do_rmdir(const char *file) | |||
295 | return(0); | 295 | return(0); |
296 | } | 296 | } |
297 | 297 | ||
298 | int do_mknod(const char *file, int mode, int dev) | 298 | int do_mknod(const char *file, int mode, unsigned int major, unsigned int minor) |
299 | { | 299 | { |
300 | int err; | 300 | int err; |
301 | 301 | ||
302 | err = mknod(file, mode, dev); | 302 | err = mknod(file, mode, makedev(major, minor)); |
303 | if(err) return(-errno); | 303 | if(err) return(-errno); |
304 | return(0); | 304 | return(0); |
305 | } | 305 | } |