diff options
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/ata/ata_da.c | 2 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_cd.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index 44d2fa6..7d39f11 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -746,6 +746,8 @@ adaregister(struct cam_periph *periph, void *arg) softc->disk->d_flags |= DISKFLAG_CANDELETE; strlcpy(softc->disk->d_ident, cgd->serial_num, MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1)); + strlcpy(softc->disk->d_descr, cgd->ident_data.model, + MIN(sizeof(softc->disk->d_descr), sizeof(cgd->ident_data.model))); softc->disk->d_hba_vendor = cpi.hba_vendor; softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 6a73efb..4c49e2d3 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -724,6 +724,12 @@ cdregister(struct cam_periph *periph, void *arg) softc->disk->d_strategy = cdstrategy; softc->disk->d_ioctl = cdioctl; softc->disk->d_name = "cd"; + cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor, + sizeof(cgd->inq_data.vendor), sizeof(softc->disk->d_descr)); + strlcat(softc->disk->d_descr, " ", sizeof(softc->disk->d_descr)); + cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)], + cgd->inq_data.product, sizeof(cgd->inq_data.product), + sizeof(softc->disk->d_descr) - strlen(softc->disk->d_descr)); softc->disk->d_unit = periph->unit_number; softc->disk->d_drv1 = periph; if (cpi.maxio == 0) |