diff --git a/lib/libcam/camlib.c b/lib/libcam/camlib.c index cd5992286054..8bac6f54059b 100644 --- a/lib/libcam/camlib.c +++ b/lib/libcam/camlib.c @@ -348,16 +348,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 +687,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); } diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 68c6d799a8c0..f3e10112cac3 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -566,11 +566,11 @@ getdevtree(void) } fprintf(stdout, "%-33s at scbus%d " - "target %d lun %d (", + "target %d lun %jx (", tmpstr, dev_result->path_id, dev_result->target_id, - dev_result->target_lun); + (uintmax_t)dev_result->target_lun); need_close = 1; diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 1d9f447474cb..3ac5fd0a5a14 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -1020,14 +1020,14 @@ xpt_announce_periph(struct cam_periph *periph, char *announce_string) cam_periph_assert(periph, MA_OWNED); periph->flags |= CAM_PERIPH_ANNOUNCED; - printf("%s%d at %s%d bus %d scbus%d target %d lun %d\n", + printf("%s%d at %s%d bus %d scbus%d target %d lun %jx\n", periph->periph_name, periph->unit_number, path->bus->sim->sim_name, path->bus->sim->unit_number, path->bus->sim->bus_id, path->bus->path_id, path->target->target_id, - path->device->lun_id); + (uintmax_t)path->device->lun_id); printf("%s%d: ", periph->periph_name, periph->unit_number); if (path->device->protocol == PROTO_SCSI) scsi_print_inquiry(&path->device->inq_data); @@ -1073,14 +1073,14 @@ xpt_denounce_periph(struct cam_periph *periph) struct cam_path *path = periph->path; cam_periph_assert(periph, MA_OWNED); - printf("%s%d at %s%d bus %d scbus%d target %d lun %d\n", + printf("%s%d at %s%d bus %d scbus%d target %d lun %jx\n", periph->periph_name, periph->unit_number, path->bus->sim->sim_name, path->bus->sim->unit_number, path->bus->sim->bus_id, path->bus->path_id, path->target->target_id, - path->device->lun_id); + (uintmax_t)path->device->lun_id); printf("%s%d: ", periph->periph_name, periph->unit_number); if (path->device->protocol == PROTO_SCSI) scsi_print_inquiry_short(&path->device->inq_data); @@ -3647,7 +3647,7 @@ xpt_print_path(struct cam_path *path) printf("X:"); if (path->device != NULL) - printf("%d): ", path->device->lun_id); + printf("%jx): ", (uintmax_t)path->device->lun_id); else printf("X): "); } @@ -3660,11 +3660,11 @@ xpt_print_device(struct cam_ed *device) if (device == NULL) printf("(nopath): "); else { - printf("(noperiph:%s%d:%d:%d:%d): ", device->sim->sim_name, + printf("(noperiph:%s%d:%d:%d:%jx): ", device->sim->sim_name, device->sim->unit_number, device->sim->bus_id, device->target->target_id, - device->lun_id); + (uintmax_t)device->lun_id); } } @@ -3707,7 +3707,8 @@ xpt_path_string(struct cam_path *path, char *str, size_t str_len) sbuf_printf(&sb, "X:"); if (path->device != NULL) - sbuf_printf(&sb, "%d): ", path->device->lun_id); + sbuf_printf(&sb, "%jx): ", + (uintmax_t)path->device->lun_id); else sbuf_printf(&sb, "X): "); }