forked from luck/tmp_suning_uos_patched
Deal with missing exports for hostfs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
51102ee5b8
commit
005a59ec74
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user