aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/um/include/shared/os.h3
-rw-r--r--arch/um/kernel/ksyms.c3
-rw-r--r--arch/um/os-Linux/file.c15
-rw-r--r--arch/um/os-Linux/user_syms.c4
-rw-r--r--fs/hostfs/hostfs_user.c6
5 files changed, 28 insertions, 3 deletions
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h
index cd40fddcf99d..c4617baaa4f2 100644
--- a/arch/um/include/shared/os.h
+++ b/arch/um/include/shared/os.h
@@ -161,6 +161,9 @@ extern int os_stat_filesystem(char *path, long *bsize_out,
161 long *spare_out); 161 long *spare_out);
162extern int os_change_dir(char *dir); 162extern int os_change_dir(char *dir);
163extern int os_fchange_dir(int fd); 163extern int os_fchange_dir(int fd);
164extern unsigned os_major(unsigned long long dev);
165extern unsigned os_minor(unsigned long long dev);
166extern unsigned long long os_makedev(unsigned major, unsigned minor);
164 167
165/* start_up.c */ 168/* start_up.c */
166extern void os_early_checks(void); 169extern void os_early_checks(void);
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c
index 836fc9b94707..0ae0dfcfbffb 100644
--- a/arch/um/kernel/ksyms.c
+++ b/arch/um/kernel/ksyms.c
@@ -58,6 +58,9 @@ EXPORT_SYMBOL(os_accept_connection);
58EXPORT_SYMBOL(os_rcv_fd); 58EXPORT_SYMBOL(os_rcv_fd);
59EXPORT_SYMBOL(run_helper); 59EXPORT_SYMBOL(run_helper);
60EXPORT_SYMBOL(start_thread); 60EXPORT_SYMBOL(start_thread);
61EXPORT_SYMBOL(os_major);
62EXPORT_SYMBOL(os_minor);
63EXPORT_SYMBOL(os_makedev);
61 64
62EXPORT_SYMBOL(add_sigio_fd); 65EXPORT_SYMBOL(add_sigio_fd);
63EXPORT_SYMBOL(ignore_sigio_fd); 66EXPORT_SYMBOL(ignore_sigio_fd);
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c
index b5afcfd0f861..140e587bc0ad 100644
--- a/arch/um/os-Linux/file.c
+++ b/arch/um/os-Linux/file.c
@@ -561,3 +561,18 @@ int os_lock_file(int fd, int excl)
561 out: 561 out:
562 return err; 562 return err;
563} 563}
564
565unsigned os_major(unsigned long long dev)
566{
567 return major(dev);
568}
569
570unsigned os_minor(unsigned long long dev)
571{
572 return minor(dev);
573}
574
575unsigned long long os_makedev(unsigned major, unsigned minor)
576{
577 return makedev(major, minor);
578}
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c
index 89b48a116a89..05f5ea8e83d2 100644
--- a/arch/um/os-Linux/user_syms.c
+++ b/arch/um/os-Linux/user_syms.c
@@ -103,6 +103,10 @@ EXPORT_SYMBOL_PROTO(getuid);
103EXPORT_SYMBOL_PROTO(fsync); 103EXPORT_SYMBOL_PROTO(fsync);
104EXPORT_SYMBOL_PROTO(fdatasync); 104EXPORT_SYMBOL_PROTO(fdatasync);
105 105
106EXPORT_SYMBOL_PROTO(lstat64);
107EXPORT_SYMBOL_PROTO(fstat64);
108EXPORT_SYMBOL_PROTO(mknod);
109
106/* Export symbols used by GCC for the stack protector. */ 110/* Export symbols used by GCC for the stack protector. */
107extern void __stack_smash_handler(void *) __attribute__((weak)); 111extern void __stack_smash_handler(void *) __attribute__((weak));
108EXPORT_SYMBOL(__stack_smash_handler); 112EXPORT_SYMBOL(__stack_smash_handler);
diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c
index b79424f93282..4b8c666ba28f 100644
--- a/fs/hostfs/hostfs_user.c
+++ b/fs/hostfs/hostfs_user.c
@@ -76,9 +76,9 @@ int file_type(const char *path, int *maj, int *min)
76 * about its definition. 76 * about its definition.
77 */ 77 */
78 if (maj != NULL) 78 if (maj != NULL)
79 *maj = major(buf.st_rdev); 79 *maj = os_major(buf.st_rdev);
80 if (min != NULL) 80 if (min != NULL)
81 *min = minor(buf.st_rdev); 81 *min = os_minor(buf.st_rdev);
82 82
83 if (S_ISDIR(buf.st_mode)) 83 if (S_ISDIR(buf.st_mode))
84 return OS_TYPE_DIR; 84 return OS_TYPE_DIR;
@@ -361,7 +361,7 @@ int do_mknod(const char *file, int mode, unsigned int major, unsigned int minor)
361{ 361{
362 int err; 362 int err;
363 363
364 err = mknod(file, mode, makedev(major, minor)); 364 err = mknod(file, mode, os_makedev(major, minor));
365 if (err) 365 if (err)
366 return -errno; 366 return -errno;
367 return 0; 367 return 0;