Author: pjd
Date: Fri Sep  4 09:33:50 2009
New Revision: 196822
URL: http://svn.freebsd.org/changeset/base/196822

Log:
  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

Modified:
  head/sys/dev/ata/ata-disk.c

Modified: head/sys/dev/ata/ata-disk.c
==============================================================================
--- head/sys/dev/ata/ata-disk.c Fri Sep  4 08:21:49 2009        (r196821)
+++ head/sys/dev/ata/ata-disk.c Fri Sep  4 09:33:50 2009        (r196822)
@@ -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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to