Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Sep 2009 09:33:50 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r196822 - head/sys/dev/ata
Message-ID:  <200909040933.n849Xoh3060664@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909040933.n849Xoh3060664>