diff options
-rw-r--r-- | arch/um/include/shared/os.h | 3 | ||||
-rw-r--r-- | arch/um/kernel/ksyms.c | 3 | ||||
-rw-r--r-- | arch/um/os-Linux/file.c | 15 | ||||
-rw-r--r-- | arch/um/os-Linux/user_syms.c | 4 | ||||
-rw-r--r-- | fs/hostfs/hostfs_user.c | 6 |
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); |
162 | extern int os_change_dir(char *dir); | 162 | extern int os_change_dir(char *dir); |
163 | extern int os_fchange_dir(int fd); | 163 | extern int os_fchange_dir(int fd); |
164 | extern unsigned os_major(unsigned long long dev); | ||
165 | extern unsigned os_minor(unsigned long long dev); | ||
166 | extern unsigned long long os_makedev(unsigned major, unsigned minor); | ||
164 | 167 | ||
165 | /* start_up.c */ | 168 | /* start_up.c */ |
166 | extern void os_early_checks(void); | 169 | extern 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); | |||
58 | EXPORT_SYMBOL(os_rcv_fd); | 58 | EXPORT_SYMBOL(os_rcv_fd); |
59 | EXPORT_SYMBOL(run_helper); | 59 | EXPORT_SYMBOL(run_helper); |
60 | EXPORT_SYMBOL(start_thread); | 60 | EXPORT_SYMBOL(start_thread); |
61 | EXPORT_SYMBOL(os_major); | ||
62 | EXPORT_SYMBOL(os_minor); | ||
63 | EXPORT_SYMBOL(os_makedev); | ||
61 | 64 | ||
62 | EXPORT_SYMBOL(add_sigio_fd); | 65 | EXPORT_SYMBOL(add_sigio_fd); |
63 | EXPORT_SYMBOL(ignore_sigio_fd); | 66 | EXPORT_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 | |||
565 | unsigned os_major(unsigned long long dev) | ||
566 | { | ||
567 | return major(dev); | ||
568 | } | ||
569 | |||
570 | unsigned os_minor(unsigned long long dev) | ||
571 | { | ||
572 | return minor(dev); | ||
573 | } | ||
574 | |||
575 | unsigned 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); | |||
103 | EXPORT_SYMBOL_PROTO(fsync); | 103 | EXPORT_SYMBOL_PROTO(fsync); |
104 | EXPORT_SYMBOL_PROTO(fdatasync); | 104 | EXPORT_SYMBOL_PROTO(fdatasync); |
105 | 105 | ||
106 | EXPORT_SYMBOL_PROTO(lstat64); | ||
107 | EXPORT_SYMBOL_PROTO(fstat64); | ||
108 | EXPORT_SYMBOL_PROTO(mknod); | ||
109 | |||
106 | /* Export symbols used by GCC for the stack protector. */ | 110 | /* Export symbols used by GCC for the stack protector. */ |
107 | extern void __stack_smash_handler(void *) __attribute__((weak)); | 111 | extern void __stack_smash_handler(void *) __attribute__((weak)); |
108 | EXPORT_SYMBOL(__stack_smash_handler); | 112 | EXPORT_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; |