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
This commit is contained in:
Scott Long 2009-06-22 14:43:48 +00:00
parent 8896f83a58
commit 571e8e20da
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194627
2 changed files with 2 additions and 2 deletions

View File

@ -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))

View File

@ -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,