From 4657145f8863220ac8250c0aa7019c5ba79e518f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 14 Jan 2003 18:59:28 +0000 Subject: fix bug & cleanup (to have less warning in debug mode) --- perl-install/sbus_probing/main.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'perl-install/sbus_probing') diff --git a/perl-install/sbus_probing/main.pm b/perl-install/sbus_probing/main.pm index 4aed43459..96d50663b 100644 --- a/perl-install/sbus_probing/main.pm +++ b/perl-install/sbus_probing/main.pm @@ -66,10 +66,10 @@ my %sbus_table_video = ( 1; -sub prom_getint($) { unpack "I", c::prom_getproperty($_[0]) } +sub prom_getint { unpack "I", c::prom_getproperty($_[0]) } #- update $@sbus_probed according to SBUS detection. -sub prom_walk($$$$) { +sub prom_walk { my ($sbus_probed, $node, $sbus, $ebus) = @_; my ($prob_name, $prob_type) = (c::prom_getstring("name"), c::prom_getstring("device_type")); my ($nextnode, $nsbus, $nebus) = (undef, $sbus, $ebus); @@ -129,10 +129,10 @@ sub prom_walk($$$$) { sub probe { eval { modules::load("openprom") } if arch() =~ /sparc/; - my $root_node = c::prom_open(); + my $root_node = c::prom_open() or return; my @l; prom_walk(\@l, $root_node, 0, 0); c::prom_close(); - map { my %l; @l{qw(type description drivers)} = @$_ } @l; + map { my %l; @l{qw(type description drivers)} = @$_; \%l } @l; } -- cgit v1.2.1