mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
printf() specifier updates to CAM to handle either 32-bit or 64-bit lun_id_t.
MFC after: 2 weeks
This commit is contained in:
parent
123055f01f
commit
abe8350519
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257382
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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): ");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user