Don't require '0x' on devnum > 10 in tcclasses

This commit is contained in:
Tom Eastep 2011-05-02 16:29:12 -07:00
parent 4300ef3ee2
commit 9a95bad17e

View File

@ -748,7 +748,6 @@ sub dev_by_number( $ ) {
} }
( $dev , $devref ); ( $dev , $devref );
} }
sub validate_tc_class( ) { sub validate_tc_class( ) {
@ -764,7 +763,7 @@ sub validate_tc_class( ) {
( $device, my ($number, $subnumber, $rest ) ) = split /:/, $device, 4; ( $device, my ($number, $subnumber, $rest ) ) = split /:/, $device, 4;
fatal_error "Invalid INTERFACE:CLASS ($devclass)" if defined $rest; fatal_error "Invalid INTERFACE:CLASS ($devclass)" if defined $rest;
if ( $device =~ /^(\d+|0x[\da-fA-F]+)$/ ) { if ( $device =~ /^(\d+|0x[\da-fA-F]+)$/ || ( $device =~ /^[\da-fA-F]+$/ && ! $tcdevices{$device} ) ) {
( $number , $classnumber ) = ( hex_value $device, hex_value $number ); ( $number , $classnumber ) = ( hex_value $device, hex_value $number );
( $device , $devref) = dev_by_number( $number ); ( $device , $devref) = dev_by_number( $number );
} else { } else {