svn commit: r236720 - stable/8/sys/dev/mfi

Sean Bruno sbruno at FreeBSD.org
Thu Jun 7 18:54:42 UTC 2012


Author: sbruno
Date: Thu Jun  7 18:54:42 2012
New Revision: 236720
URL: http://svn.freebsd.org/changeset/base/236720

Log:
  MFC r236323
  
  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.

Modified:
  stable/8/sys/dev/mfi/mfi_disk.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/dev/mfi/mfi_disk.c
==============================================================================
--- stable/8/sys/dev/mfi/mfi_disk.c	Thu Jun  7 18:44:06 2012	(r236719)
+++ stable/8/sys/dev/mfi/mfi_disk.c	Thu Jun  7 18:54:42 2012	(r236720)
@@ -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;


More information about the svn-src-all mailing list