Commit:     88f6cd0c3bb5db2619103f834d4167b7d0d9899c
Parent:     7a238fcba0629b6f2edbcd37458bae56fcf36be5
Author:     Johannes Stezenbach <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 29 13:19:44 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jan 30 08:26:44 2007 -0800

    [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()
    Signed-off-by: Johannes Stezenbach <[EMAIL PROTECTED]>
    Acked-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]>
    Cc: Jeff Dike <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/hostfs/hostfs.h      |    2 +-
 fs/hostfs/hostfs_kern.c |    2 +-
 fs/hostfs/hostfs_user.c |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/hostfs/hostfs.h b/fs/hostfs/hostfs.h
index cca3fb6..70543b1 100644
--- a/fs/hostfs/hostfs.h
+++ b/fs/hostfs/hostfs.h
@@ -76,7 +76,7 @@ extern int make_symlink(const char *from, const char *to);
 extern int unlink_file(const char *file);
 extern int do_mkdir(const char *file, int mode);
 extern int do_rmdir(const char *file);
-extern int do_mknod(const char *file, int mode, int dev);
+extern int do_mknod(const char *file, int mode, unsigned int major, unsigned 
int minor);
 extern int link_file(const char *from, const char *to);
 extern int do_readlink(char *file, char *buf, int size);
 extern int rename_file(char *from, char *to);
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 1e6fc37..69a376f 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -755,7 +755,7 @@ int hostfs_mknod(struct inode *dir, struct dentry *dentry, 
int mode, dev_t dev)
                goto out_put;
        init_special_inode(inode, mode, dev);
-       err = do_mknod(name, mode, dev);
+       err = do_mknod(name, mode, MAJOR(dev), MINOR(dev));
                goto out_free;
diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c
index 23b7cee..1ed5ea3 100644
--- a/fs/hostfs/hostfs_user.c
+++ b/fs/hostfs/hostfs_user.c
@@ -295,11 +295,11 @@ int do_rmdir(const char *file)
-int do_mknod(const char *file, int mode, int dev)
+int do_mknod(const char *file, int mode, unsigned int major, unsigned int 
        int err;
-       err = mknod(file, mode, dev);
+       err = mknod(file, mode, makedev(major, minor));
        if(err) return(-errno);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to