Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 May 2012 17:07:50 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r236323 - head/sys/dev/mfi
Message-ID:  <201205301707.q4UH7osI063978@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Wed May 30 17:07:50 2012
New Revision: 236323
URL: http://svn.freebsd.org/changeset/base/236323

Log:
  Cosmetic nit.  If a configured volume has no label, don't emit an empty
  string for the name during probe.  Simply indicate that it has no label.
  
  Submitted by:	bhaga@
  MFC after:	3 days

Modified:
  head/sys/dev/mfi/mfi_disk.c

Modified: head/sys/dev/mfi/mfi_disk.c
==============================================================================
--- head/sys/dev/mfi/mfi_disk.c	Wed May 30 16:45:41 2012	(r236322)
+++ head/sys/dev/mfi/mfi_disk.c	Wed May 30 17:07:50 2012	(r236323)
@@ -130,10 +130,17 @@ mfi_disk_attach(device_t dev)
 		state = "unknown";
 		break;
 	}
-	device_printf(dev, "%juMB (%ju sectors) RAID volume '%s' is %s\n",
-		      sectors / (1024 * 1024 / secsize), sectors,
-		      ld_info->ld_config.properties.name,
-		      state);
+
+        if ( strlen(ld_info->ld_config.properties.name) == 0 ) {
+                device_printf(dev, 
+                      "%juMB (%ju sectors) RAID volume (no label) is %s\n",
+                      sectors / (1024 * 1024 / secsize), sectors, state);
+        } else { 
+                device_printf(dev, 
+                      "%juMB (%ju sectors) RAID volume '%s' is %s\n",
+                      sectors / (1024 * 1024 / secsize), sectors,
+                      ld_info->ld_config.properties.name, state);
+        }
 
 	sc->ld_disk = disk_alloc();
 	sc->ld_disk->d_drv1 = sc;



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