summaryrefslogtreecommitdiffstats
path: root/sys/cam/ata/ata_all.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2013-10-24 10:33:31 +0000
committermav <mav@FreeBSD.org>2013-10-24 10:33:31 +0000
commitc896ef2cccb7601faf5c79451228435a0717d08b (patch)
treef73b38176bc5e7759b1a1696805cc8037324e111 /sys/cam/ata/ata_all.c
parent5411f6951ede72a782138783542ebb0cff454b91 (diff)
downloadFreeBSD-src-c896ef2cccb7601faf5c79451228435a0717d08b.zip
FreeBSD-src-c896ef2cccb7601faf5c79451228435a0717d08b.tar.gz
MFC r256552:
Unify periph invalidation and destruction reporting. Print message containing device model and serial number on invalidation. Approved by: re (hrs)
Diffstat (limited to 'sys/cam/ata/ata_all.c')
-rw-r--r--sys/cam/ata/ata_all.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/cam/ata/ata_all.c b/sys/cam/ata/ata_all.c
index 940b572..b88fcd1 100644
--- a/sys/cam/ata/ata_all.c
+++ b/sys/cam/ata/ata_all.c
@@ -297,6 +297,18 @@ ata_print_ident(struct ata_params *ident_data)
}
void
+ata_print_ident_short(struct ata_params *ident_data)
+{
+ char product[48], revision[16];
+
+ cam_strvis(product, ident_data->model, sizeof(ident_data->model),
+ sizeof(product));
+ cam_strvis(revision, ident_data->revision, sizeof(ident_data->revision),
+ sizeof(revision));
+ printf("<%s %s>", product, revision);
+}
+
+void
semb_print_ident(struct sep_identify_data *ident_data)
{
char vendor[9], product[17], revision[5], fw[5], in[7], ins[5];
@@ -311,6 +323,18 @@ semb_print_ident(struct sep_identify_data *ident_data)
vendor, product, revision, fw, in, ins);
}
+void
+semb_print_ident_short(struct sep_identify_data *ident_data)
+{
+ char vendor[9], product[17], revision[5], fw[5];
+
+ cam_strvis(vendor, ident_data->vendor_id, 8, sizeof(vendor));
+ cam_strvis(product, ident_data->product_id, 16, sizeof(product));
+ cam_strvis(revision, ident_data->product_rev, 4, sizeof(revision));
+ cam_strvis(fw, ident_data->firmware_rev, 4, sizeof(fw));
+ printf("<%s %s %s %s>", vendor, product, revision, fw);
+}
+
uint32_t
ata_logical_sector_size(struct ata_params *ident_data)
{
OpenPOWER on IntegriCloud