Commit f6700539 authored by David Gibson's avatar David Gibson Committed by Linus Torvalds

[PATCH] Fix compile with !CONFIG_VT

Architectures using the generic 32/64-bit ioctl() compatibility shims
will get a link error if CONFIG_VT is not defined, since the
compatbility ioctl() code calls functions in drivers/char/vt.c which
is only included in the build if CONFIG_VT is set.

This fixes the compile with a couple of #ifdefs:
parent 123ed32a
...@@ -1562,6 +1562,8 @@ static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -1562,6 +1562,8 @@ static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg)
extern int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg); extern int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg);
#ifdef CONFIG_VT
static int vt_check(struct file *file) static int vt_check(struct file *file)
{ {
struct tty_struct *tty; struct tty_struct *tty;
...@@ -1693,6 +1695,8 @@ static int do_unimap_ioctl(unsigned int fd, unsigned int cmd, struct unimapdesc3 ...@@ -1693,6 +1695,8 @@ static int do_unimap_ioctl(unsigned int fd, unsigned int cmd, struct unimapdesc3
return 0; return 0;
} }
#endif /* CONFIG_VT */
static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long arg) static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long arg)
{ {
mm_segment_t old_fs = get_fs(); mm_segment_t old_fs = get_fs();
...@@ -2398,11 +2402,13 @@ HANDLE_IOCTL(LOOP_SET_STATUS, loop_status) ...@@ -2398,11 +2402,13 @@ HANDLE_IOCTL(LOOP_SET_STATUS, loop_status)
HANDLE_IOCTL(LOOP_GET_STATUS, loop_status) HANDLE_IOCTL(LOOP_GET_STATUS, loop_status)
#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int) #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int)
HANDLE_IOCTL(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout) HANDLE_IOCTL(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout)
#ifdef CONFIG_VT
HANDLE_IOCTL(PIO_FONTX, do_fontx_ioctl) HANDLE_IOCTL(PIO_FONTX, do_fontx_ioctl)
HANDLE_IOCTL(GIO_FONTX, do_fontx_ioctl) HANDLE_IOCTL(GIO_FONTX, do_fontx_ioctl)
HANDLE_IOCTL(PIO_UNIMAP, do_unimap_ioctl) HANDLE_IOCTL(PIO_UNIMAP, do_unimap_ioctl)
HANDLE_IOCTL(GIO_UNIMAP, do_unimap_ioctl) HANDLE_IOCTL(GIO_UNIMAP, do_unimap_ioctl)
HANDLE_IOCTL(KDFONTOP, do_kdfontop_ioctl) HANDLE_IOCTL(KDFONTOP, do_kdfontop_ioctl)
#endif
HANDLE_IOCTL(EXT2_IOC32_GETFLAGS, do_ext2_ioctl) HANDLE_IOCTL(EXT2_IOC32_GETFLAGS, do_ext2_ioctl)
HANDLE_IOCTL(EXT2_IOC32_SETFLAGS, do_ext2_ioctl) HANDLE_IOCTL(EXT2_IOC32_SETFLAGS, do_ext2_ioctl)
HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl) HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment