Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 2009 16:28:07 +0000 (UTC)
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197409 - in head/sys/dev: twa twe
Message-ID:  <200909221628.n8MGS72v025276@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rdivacky
Date: Tue Sep 22 16:28:07 2009
New Revision: 197409
URL: http://svn.freebsd.org/changeset/base/197409

Log:
  Change the command argument to ioctl routines to u_long to avoid
  truncating the command to 32bit on 64bit archs where int is 32bit
  (ie. amd64).
  
  Approved by:	scottl
  Approved by:	ed (mentor, implicit)

Modified:
  head/sys/dev/twa/tw_cl_io.c
  head/sys/dev/twa/tw_cl_share.h
  head/sys/dev/twe/twe.c
  head/sys/dev/twe/twevar.h

Modified: head/sys/dev/twa/tw_cl_io.c
==============================================================================
--- head/sys/dev/twa/tw_cl_io.c	Tue Sep 22 16:22:05 2009	(r197408)
+++ head/sys/dev/twa/tw_cl_io.c	Tue Sep 22 16:28:07 2009	(r197409)
@@ -396,7 +396,7 @@ tw_cl_fw_passthru(struct tw_cl_ctlr_hand
  *			non-zero-- failure
  */
 TW_INT32
-tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, TW_INT32 cmd, TW_VOID *buf)
+tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, u_long cmd, TW_VOID *buf)
 {
 	struct tw_cli_ctlr_context	*ctlr =
 		(struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt);

Modified: head/sys/dev/twa/tw_cl_share.h
==============================================================================
--- head/sys/dev/twa/tw_cl_share.h	Tue Sep 22 16:22:05 2009	(r197408)
+++ head/sys/dev/twa/tw_cl_share.h	Tue Sep 22 16:28:07 2009	(r197409)
@@ -565,7 +565,7 @@ extern TW_INT32	tw_cl_interrupt(struct t
 
 /* CL's ioctl handler. */
 extern TW_INT32	tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle,
-	TW_INT32 cmd, TW_VOID *buf);
+	u_long cmd, TW_VOID *buf);
 
 
 #ifdef TW_OSL_DEBUG

Modified: head/sys/dev/twe/twe.c
==============================================================================
--- head/sys/dev/twe/twe.c	Tue Sep 22 16:22:05 2009	(r197408)
+++ head/sys/dev/twe/twe.c	Tue Sep 22 16:28:07 2009	(r197409)
@@ -487,7 +487,7 @@ twe_dump_blocks(struct twe_softc *sc, in
  * Handle controller-specific control operations.
  */
 int
-twe_ioctl(struct twe_softc *sc, int ioctlcmd, void *addr)
+twe_ioctl(struct twe_softc *sc, u_long ioctlcmd, void *addr)
 {
     struct twe_usercommand	*tu = (struct twe_usercommand *)addr;
     struct twe_paramcommand	*tp = (struct twe_paramcommand *)addr;

Modified: head/sys/dev/twe/twevar.h
==============================================================================
--- head/sys/dev/twe/twevar.h	Tue Sep 22 16:22:05 2009	(r197408)
+++ head/sys/dev/twe/twevar.h	Tue Sep 22 16:28:07 2009	(r197409)
@@ -150,7 +150,7 @@ extern void	twe_startio(struct twe_softc
 extern int	twe_start(struct twe_request *tr);
 extern int	twe_dump_blocks(struct twe_softc *sc, int unit,	/* crashdump block write */
 				u_int32_t lba, void *data, int nblks);
-extern int	twe_ioctl(struct twe_softc *sc, int cmd,
+extern int	twe_ioctl(struct twe_softc *sc, u_long cmd,
 				  void *addr);			/* handle user request */
 extern void	twe_describe_controller(struct twe_softc *sc);	/* print controller info */
 extern void	twe_print_controller(struct twe_softc *sc);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909221628.n8MGS72v025276>