Skip to content

Commit

Permalink
Deal with missing exports for hostfs
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Aug 9, 2010
1 parent 51102ee commit 005a59e
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
3 changes: 3 additions & 0 deletions arch/um/include/shared/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ extern int os_stat_filesystem(char *path, long *bsize_out,
long *spare_out);
extern int os_change_dir(char *dir);
extern int os_fchange_dir(int fd);
extern unsigned os_major(unsigned long long dev);
extern unsigned os_minor(unsigned long long dev);
extern unsigned long long os_makedev(unsigned major, unsigned minor);

/* start_up.c */
extern void os_early_checks(void);
Expand Down
3 changes: 3 additions & 0 deletions arch/um/kernel/ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ EXPORT_SYMBOL(os_accept_connection);
EXPORT_SYMBOL(os_rcv_fd);
EXPORT_SYMBOL(run_helper);
EXPORT_SYMBOL(start_thread);
EXPORT_SYMBOL(os_major);
EXPORT_SYMBOL(os_minor);
EXPORT_SYMBOL(os_makedev);

EXPORT_SYMBOL(add_sigio_fd);
EXPORT_SYMBOL(ignore_sigio_fd);
Expand Down
15 changes: 15 additions & 0 deletions arch/um/os-Linux/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,3 +561,18 @@ int os_lock_file(int fd, int excl)
out:
return err;
}

unsigned os_major(unsigned long long dev)
{
return major(dev);
}

unsigned os_minor(unsigned long long dev)
{
return minor(dev);
}

unsigned long long os_makedev(unsigned major, unsigned minor)
{
return makedev(major, minor);
}
4 changes: 4 additions & 0 deletions arch/um/os-Linux/user_syms.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ EXPORT_SYMBOL_PROTO(getuid);
EXPORT_SYMBOL_PROTO(fsync);
EXPORT_SYMBOL_PROTO(fdatasync);

EXPORT_SYMBOL_PROTO(lstat64);
EXPORT_SYMBOL_PROTO(fstat64);
EXPORT_SYMBOL_PROTO(mknod);

/* Export symbols used by GCC for the stack protector. */
extern void __stack_smash_handler(void *) __attribute__((weak));
EXPORT_SYMBOL(__stack_smash_handler);
Expand Down
6 changes: 3 additions & 3 deletions fs/hostfs/hostfs_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ int file_type(const char *path, int *maj, int *min)
* about its definition.
*/
if (maj != NULL)
*maj = major(buf.st_rdev);
*maj = os_major(buf.st_rdev);
if (min != NULL)
*min = minor(buf.st_rdev);
*min = os_minor(buf.st_rdev);

if (S_ISDIR(buf.st_mode))
return OS_TYPE_DIR;
Expand Down Expand Up @@ -361,7 +361,7 @@ int do_mknod(const char *file, int mode, unsigned int major, unsigned int minor)
{
int err;

err = mknod(file, mode, makedev(major, minor));
err = mknod(file, mode, os_makedev(major, minor));
if (err)
return -errno;
return 0;
Expand Down

0 comments on commit 005a59e

Please sign in to comment.