diff options
author | sjg <sjg@FreeBSD.org> | 2014-04-27 08:13:43 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2014-04-27 08:13:43 +0000 |
commit | 0c7e03a54c8e7ddc9c3fe710f83d9ca53173692e (patch) | |
tree | b92e741b68057a24e381faa9809f32030d65574c /lib/libcam | |
parent | c244fcbcaa61dc2a15995e7dbdf3ae8107bc2111 (diff) | |
parent | 69c3e6933b6946c49fe99b19986f018d71621980 (diff) | |
download | FreeBSD-src-0c7e03a54c8e7ddc9c3fe710f83d9ca53173692e.zip FreeBSD-src-0c7e03a54c8e7ddc9c3fe710f83d9ca53173692e.tar.gz |
Merge head
Diffstat (limited to 'lib/libcam')
-rw-r--r-- | lib/libcam/Makefile | 2 | ||||
-rw-r--r-- | lib/libcam/camlib.c | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/libcam/Makefile b/lib/libcam/Makefile index 9a21dde..1621fe6 100644 --- a/lib/libcam/Makefile +++ b/lib/libcam/Makefile @@ -42,6 +42,6 @@ MLINKS+= cam.3 cam_open_device.3 \ SDIR= ${.CURDIR}/../../sys CFLAGS+= -I${.CURDIR} -I${SDIR} -SHLIB_MAJOR= 6 +SHLIB_MAJOR= 7 .include <bsd.lib.mk> diff --git a/lib/libcam/camlib.c b/lib/libcam/camlib.c index cd59922..f320247 100644 --- a/lib/libcam/camlib.c +++ b/lib/libcam/camlib.c @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <stdio.h> #include <stdlib.h> +#include <stdint.h> #include <string.h> #include <fcntl.h> #include <unistd.h> @@ -348,16 +349,16 @@ cam_open_btl(path_id_t path_id, target_id_t target_id, lun_id_t target_lun, if (ccb.cdm.status == CAM_DEV_MATCH_MORE) { snprintf(cam_errbuf, CAM_ERRBUF_SIZE, "%s: CDM reported more than one" - " passthrough device at %d:%d:%d!!\n", - func_name, path_id, target_id, target_lun); + " passthrough device at %d:%d:%jx!!\n", + func_name, path_id, target_id, (uintmax_t)target_lun); goto btl_bailout; } if (ccb.cdm.num_matches == 0) { snprintf(cam_errbuf, CAM_ERRBUF_SIZE, "%s: no passthrough device found at" - " %d:%d:%d", func_name, path_id, target_id, - target_lun); + " %d:%d:%jx", func_name, path_id, target_id, + (uintmax_t)target_lun); goto btl_bailout; } @@ -687,14 +688,14 @@ cam_path_string(struct cam_device *dev, char *str, int len) return(str); } - snprintf(str, len, "(%s%d:%s%d:%d:%d:%d): ", + snprintf(str, len, "(%s%d:%s%d:%d:%d:%jx): ", (dev->device_name[0] != '\0') ? dev->device_name : "pass", dev->dev_unit_num, (dev->sim_name[0] != '\0') ? dev->sim_name : "unknown", dev->sim_unit_number, dev->bus_id, dev->target_id, - dev->target_lun); + (uintmax_t)dev->target_lun); return(str); } |