Commit 1e2f58c2 authored by Mike Hibler's avatar Mike Hibler
Browse files

Newer FreeBSD (post 10.x) no longer have the "ada" compat names.

parent b04bae0c
......@@ -238,14 +238,16 @@ sub find_serial($)
sub init_serial_map()
{
my %snmap = ();
my $compatnames = 1;
my @lines = `ls /dev/ad* /dev/da* /dev/mfid* /dev/mfisyspd* /dev/nvd* 2>&1`;
again:
foreach (@lines) {
# XXX just use the /dev/ad? traditional names for now
if (m#^/dev/ada\d+$#) {
if ($compatnames && m#^/dev/ada\d+$#) {
next;
}
if (m#^/dev/((?:da|ad|mfid|mfisyspd|nvd)\d+)$#) {
if (m#^/dev/((?:da|ad|ada|mfid|mfisyspd|nvd)\d+)$#) {
my $dev = $1;
$sn = find_serial($dev);
if ($sn) {
......@@ -257,6 +259,11 @@ sub init_serial_map()
}
}
if ($compatnames && keys(%snmap) == 0) {
$compatnames = 0;
goto again;
}
return \%snmap;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment