summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam_periph.h
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2009-06-22 14:43:48 +0000
committerscottl <scottl@FreeBSD.org>2009-06-22 14:43:48 +0000
commitc2d859a8353bbcd0227ab8fd2a513983e9d6e290 (patch)
treec56ae7cd3237cacff3d5539ddd7aeeafdf740ec3 /sys/cam/cam_periph.h
parent3c02410d55d9cfe0cb4dcbfad5eef376463d8e08 (diff)
downloadFreeBSD-src-c2d859a8353bbcd0227ab8fd2a513983e9d6e290.zip
FreeBSD-src-c2d859a8353bbcd0227ab8fd2a513983e9d6e290.tar.gz
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
Diffstat (limited to 'sys/cam/cam_periph.h')
-rw-r--r--sys/cam/cam_periph.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/cam/cam_periph.h b/sys/cam/cam_periph.h
index 8a45806..f95a94f 100644
--- a/sys/cam/cam_periph.h
+++ b/sys/cam/cam_periph.h
@@ -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,
OpenPOWER on IntegriCloud