summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2012-05-30 17:07:50 +0000
committersbruno <sbruno@FreeBSD.org>2012-05-30 17:07:50 +0000
commit6927a0f2fc97960910acfb0b7aae0d56b45c2859 (patch)
treea6736700f08eb21e9c7d8c51129ec6c287f2e6c7 /sys/dev
parenta9195b9fe2f69dd65ea6981da71c1dfff661dfdb (diff)
downloadFreeBSD-src-6927a0f2fc97960910acfb0b7aae0d56b45c2859.zip
FreeBSD-src-6927a0f2fc97960910acfb0b7aae0d56b45c2859.tar.gz
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
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/mfi/mfi_disk.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/mfi/mfi_disk.c b/sys/dev/mfi/mfi_disk.c
index ae5b49f..fc43e67 100644
--- a/sys/dev/mfi/mfi_disk.c
+++ b/sys/dev/mfi/mfi_disk.c
@@ -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;
OpenPOWER on IntegriCloud