aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2008-07-16 09:52:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-16 14:46:16 -0400
commit3c3622dcb64c76c9abd2e468f802db9ba523421c (patch)
tree0e1ad9be83fb88c9a3e11e4a215f5ec244241785
parente3621ee633810be1079d0fa65ac2c904f53b73fa (diff)
Fix compile issues in fs/compat_ioctl.c when CONFIG_BLOCK is disabled
Fix fs/compat_ioctl.c to handle CONFIG_BLOCK=n, CONFIG_SCSI=n to avoid build errors: In file included from include/scsi/scsi.h:12, from fs/compat_ioctl.c:71: include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB In file included from include/scsi/scsi.h:12, from fs/compat_ioctl.c:71: include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd': include/scsi/scsi_cmnd.h:182: error: implicit declaration of function 'blk_bidi_rq' include/scsi/scsi_cmnd.h:183: error: dereferencing pointer to incomplete type include/scsi/scsi_cmnd.h: In function 'scsi_in': include/scsi/scsi_cmnd.h:189: error: dereferencing pointer to incomplete type Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/compat_ioctl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 97dba0d92348..c54eaab71a19 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -69,9 +69,11 @@
69#include <linux/capi.h> 69#include <linux/capi.h>
70#include <linux/gigaset_dev.h> 70#include <linux/gigaset_dev.h>
71 71
72#ifdef CONFIG_BLOCK
72#include <scsi/scsi.h> 73#include <scsi/scsi.h>
73#include <scsi/scsi_ioctl.h> 74#include <scsi/scsi_ioctl.h>
74#include <scsi/sg.h> 75#include <scsi/sg.h>
76#endif
75 77
76#include <asm/uaccess.h> 78#include <asm/uaccess.h>
77#include <linux/ethtool.h> 79#include <linux/ethtool.h>
@@ -2024,6 +2026,7 @@ COMPATIBLE_IOCTL(GIO_UNISCRNMAP)
2024COMPATIBLE_IOCTL(PIO_UNISCRNMAP) 2026COMPATIBLE_IOCTL(PIO_UNISCRNMAP)
2025COMPATIBLE_IOCTL(PIO_FONTRESET) 2027COMPATIBLE_IOCTL(PIO_FONTRESET)
2026COMPATIBLE_IOCTL(PIO_UNIMAPCLR) 2028COMPATIBLE_IOCTL(PIO_UNIMAPCLR)
2029#ifdef CONFIG_BLOCK
2027/* Big S */ 2030/* Big S */
2028COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN) 2031COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN)
2029COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK) 2032COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK)
@@ -2033,6 +2036,7 @@ COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMBER)
2033COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND) 2036COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND)
2034COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST) 2037COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST)
2035COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI) 2038COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI)
2039#endif
2036/* Big T */ 2040/* Big T */
2037COMPATIBLE_IOCTL(TUNSETNOCSUM) 2041COMPATIBLE_IOCTL(TUNSETNOCSUM)
2038COMPATIBLE_IOCTL(TUNSETDEBUG) 2042COMPATIBLE_IOCTL(TUNSETDEBUG)
@@ -2103,6 +2107,7 @@ COMPATIBLE_IOCTL(SIOCGIFVLAN)
2103COMPATIBLE_IOCTL(SIOCSIFVLAN) 2107COMPATIBLE_IOCTL(SIOCSIFVLAN)
2104COMPATIBLE_IOCTL(SIOCBRADDBR) 2108COMPATIBLE_IOCTL(SIOCBRADDBR)
2105COMPATIBLE_IOCTL(SIOCBRDELBR) 2109COMPATIBLE_IOCTL(SIOCBRDELBR)
2110#ifdef CONFIG_BLOCK
2106/* SG stuff */ 2111/* SG stuff */
2107COMPATIBLE_IOCTL(SG_SET_TIMEOUT) 2112COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
2108COMPATIBLE_IOCTL(SG_GET_TIMEOUT) 2113COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
@@ -2127,6 +2132,7 @@ COMPATIBLE_IOCTL(SG_SCSI_RESET)
2127COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE) 2132COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE)
2128COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN) 2133COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN)
2129COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN) 2134COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN)
2135#endif
2130/* PPP stuff */ 2136/* PPP stuff */
2131COMPATIBLE_IOCTL(PPPIOCGFLAGS) 2137COMPATIBLE_IOCTL(PPPIOCGFLAGS)
2132COMPATIBLE_IOCTL(PPPIOCSFLAGS) 2138COMPATIBLE_IOCTL(PPPIOCSFLAGS)