Date: Mon, 22 Jun 2009 14:43:48 +0000 (UTC) From: Scott Long <scottl@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r194627 - head/sys/cam Message-ID: <200906221443.n5MEhm0L043920@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: scottl Date: Mon Jun 22 14:43:48 2009 New Revision: 194627 URL: http://svn.freebsd.org/changeset/base/194627 Log: Change cam_periph_ioctl() to take 'cmd' and a u_long instead of an int. All of its callers pass in cmd as a u_long, so this has always been a dangerous type demotion. It was spooted by clang/llvm trying to do a type promotion and sign extension within cam_periph_ioctl. Submitted by: rdivacky Modified: head/sys/cam/cam_periph.c head/sys/cam/cam_periph.h Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Mon Jun 22 14:42:14 2009 (r194626) +++ head/sys/cam/cam_periph.c Mon Jun 22 14:43:48 2009 (r194627) @@ -797,7 +797,7 @@ cam_periph_ccbwait(union ccb *ccb) } int -cam_periph_ioctl(struct cam_periph *periph, int cmd, caddr_t addr, +cam_periph_ioctl(struct cam_periph *periph, u_long cmd, caddr_t addr, int (*error_routine)(union ccb *ccb, cam_flags camflags, u_int32_t sense_flags)) Modified: head/sys/cam/cam_periph.h ============================================================================== --- head/sys/cam/cam_periph.h Mon Jun 22 14:42:14 2009 (r194626) +++ head/sys/cam/cam_periph.h Mon Jun 22 14:43:48 2009 (r194627) @@ -158,7 +158,7 @@ int cam_periph_runccb(union ccb *ccb, u_int32_t sense_flags), cam_flags camflags, u_int32_t sense_flags, struct devstat *ds); -int cam_periph_ioctl(struct cam_periph *periph, int cmd, +int cam_periph_ioctl(struct cam_periph *periph, u_long cmd, caddr_t addr, int (*error_routine)(union ccb *ccb, cam_flags camflags,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906221443.n5MEhm0L043920>