| 2709 | | my ($adapter_nr, $not_to_scan) = @_; |
| 2710 | | my ($funcs, $chip, $addr); |
| 2711 | | |
| 2712 | | # As we modify it, we need a copy |
| 2713 | | my @not_to_scan = @$not_to_scan; |
| | 2709 | my ($adapter_nr) = @_; |
| | 2710 | my ($funcs, $chip, $addr, $input, @not_to_scan); |
| | 2711 | |
| | 2712 | print "Next adapter: $i2c_adapters[$adapter_nr]->{name} (i2c-$adapter_nr)\n". |
| | 2713 | "Do you want to scan it? (YES/no/selectively): "; |
| | 2714 | |
| | 2715 | $input = <STDIN>; |
| | 2716 | return if $input =~ /^\s*n/i; |
| | 2717 | |
| | 2718 | if ($input =~ /^\s*s/i) { |
| | 2719 | print "Please enter one or more addresses not to scan. Separate them with commas.\n", |
| | 2720 | "You can specify a range by using dashes. Example: 0x58-0x5f,0x69.\n", |
| | 2721 | "Addresses: "; |
| | 2722 | $input = <STDIN>; |
| | 2723 | chomp($input); |
| | 2724 | @not_to_scan = parse_not_to_scan(0x03, 0x77, $input); |
| | 2725 | } |
| | 2726 | print "\n"; |
| 4938 | | print "Next adapter: $i2c_adapters[$dev_nr]->{name} (i2c-$dev_nr)\n". |
| 4939 | | "Do you want to scan it? (YES/no/selectively): "; |
| 4940 | | |
| 4941 | | $input = <STDIN>; |
| 4942 | | unless ($input =~ /^\s*n/i) { |
| 4943 | | if ($input =~ /^\s*s/i) { |
| 4944 | | print "Please enter one or more addresses not to scan. Separate them with commas.\n", |
| 4945 | | "You can specify a range by using dashes. Example: 0x58-0x5f,0x69.\n", |
| 4946 | | "Addresses: "; |
| 4947 | | $input = <STDIN>; |
| 4948 | | chomp($input); |
| 4949 | | @not_to_scan = parse_not_to_scan(0x03, 0x77, $input); |
| 4950 | | } |
| 4951 | | scan_i2c_adapter($dev_nr, \@not_to_scan) |
| 4952 | | } |
| 4953 | | print "\n"; |
| | 4950 | scan_i2c_adapter($dev_nr); |