From 8a3c78d60c72f4e2b4a8f99caef9f875e14d95cb Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 12 May 2013 21:08:46 -0700 Subject: [PATCH] Handle model format seen on FreeBSD 8 --- bsdfdisk/bsdfdisk-lib.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsdfdisk/bsdfdisk-lib.pl b/bsdfdisk/bsdfdisk-lib.pl index 35886c403..33ab0e844 100644 --- a/bsdfdisk/bsdfdisk-lib.pl +++ b/bsdfdisk/bsdfdisk-lib.pl @@ -99,8 +99,8 @@ foreach my $dev (glob("/dev/ada[0-9]"), # Get disk model from dmesg open(DMESG, "/var/run/dmesg.boot"); while() { - if (/^(\S+):\s+<(.*)>/ && $1 eq $disk->{'short'}) { - $disk->{'model'} = $2; + if (/^(\S+):\s+(\S+\s+)?<(.*)>/ && $1 eq $disk->{'short'}) { + $disk->{'model'} = $3; } elsif (/^(\S+):\s+(\d+)(\S+)\s+\((\d+)\s+(\d+)\s+byte\s+sectors/ && $1 eq $disk->{'short'}) {