summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2009-09-04 09:33:50 +0000
committerpjd <pjd@FreeBSD.org>2009-09-04 09:33:50 +0000
commite49c4b7112deed7be5f8aaf7357f7730384ec9b3 (patch)
tree2c6364cbf5ba4234a61d222f7ca3b023983ff4ae
parentb1eaddb48f126d396ca9322eb8846384ec61160d (diff)
downloadFreeBSD-src-e49c4b7112deed7be5f8aaf7357f7730384ec9b3.zip
FreeBSD-src-e49c4b7112deed7be5f8aaf7357f7730384ec9b3.tar.gz
Remove 'ad:' prefix from disk serial number. We don't want serial number
to change when we reconnect the disk in a way that it is accessible through CAM for example. Discussed with: trasz
-rw-r--r--sys/dev/ata/ata-disk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 15b9edc..c699a05 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -136,8 +136,8 @@ ad_attach(device_t dev)
if ((atadev->param.support.command2 & ATA_SUPPORT_CFA) ||
atadev->param.config == ATA_PROTO_CFA)
adp->disk->d_flags = DISKFLAG_CANDELETE;
- snprintf(adp->disk->d_ident, sizeof(adp->disk->d_ident), "ad:%s",
- atadev->param.serial);
+ strlcpy(adp->disk->d_ident, atadev->param.serial,
+ sizeof(adp->disk->d_ident));
disk_create(adp->disk, DISK_VERSION);
device_add_child(dev, "subdisk", device_get_unit(dev));
ad_firmware_geom_adjust(dev, adp->disk);
OpenPOWER on IntegriCloud