Author: sbruno
Date: Thu Jun  7 18:44:06 2012
New Revision: 236719
URL: http://svn.freebsd.org/changeset/base/236719

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/9/sys/dev/mfi/mfi_disk.c

Modified: stable/9/sys/dev/mfi/mfi_disk.c
==============================================================================
--- stable/9/sys/dev/mfi/mfi_disk.c     Thu Jun  7 15:57:30 2012        
(r236718)
+++ stable/9/sys/dev/mfi/mfi_disk.c     Thu Jun  7 18:44:06 2012        
(r236719)
@@ -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;
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to