Changeset 1c8d53bf85b1f570d1dc69b1498b880a3ade836a
- Timestamp:
- 09/30/09 04:29:59 (2 years ago)
- Author:
- H. Peter Anvin <hpa@…>
- Children:
- 6ce3fcc997931e7903408724b4cade3ed09b1e99
- Parents:
- be00bea49c01c59cb6891934b13614393043c877
- git-committer:
- H. Peter Anvin <hpa@zytor.com> / 2009-09-29T21:29:59Z-0700
- Message:
-
pxelinux-options: add help text
Add help text to pxelinux-options.
Signed-off-by: H. Peter Anvin <hpa@…>
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rbe00be
|
r1c8d53
|
|
| 17 | 17 | ); |
| 18 | 18 | |
| 19 | | @fmt_oneip = (\&parse_oneip, \&show_ip); |
| 20 | | @fmt_multiip = (\&parse_multiip, \&show_ip); |
| 21 | | @fmt_string = (\&parse_string, \&show_string); |
| 22 | | @fmt_uint32 = (\&parse_uint32, \&show_uint32); |
| | 19 | @fmt_oneip = ("ip-address", \&parse_oneip, \&show_ip); |
| | 20 | @fmt_multiip = ("ip-address-list", \&parse_multiip, \&show_ip); |
| | 21 | @fmt_string = ("string", \&parse_string, \&show_string); |
| | 22 | @fmt_uint32 = ("uint32", \&parse_uint32, \&show_uint32); |
| 23 | 23 | |
| 24 | 24 | %option_format = ( |
| … |
… |
|
| 162 | 162 | |
| 163 | 163 | if (defined($option_format{$opt})) { |
| 164 | | $v = $option_format{$opt}[0]($arg); |
| | 164 | $v = $option_format{$opt}[1]($arg); |
| 165 | 165 | return $v if (defined($v)); |
| 166 | 166 | } |
| … |
… |
|
| 175 | 175 | |
| 176 | 176 | if (defined($option_format{$opt})) { |
| 177 | | $v = $option_format{$opt}[1]($arg); |
| | 177 | $v = $option_format{$opt}[2]($arg); |
| 178 | 178 | return $v if (defined($v)); |
| 179 | 179 | } |
| … |
… |
|
| 328 | 328 | sub usage() |
| 329 | 329 | { |
| 330 | | print STDERR "FIX USAGE MESSAGE\n"; |
| | 330 | my $i; |
| | 331 | |
| | 332 | print STDERR "Usage: $0 options pxelinux.0\n"; |
| | 333 | print STDERR "Options:\n"; |
| | 334 | print STDERR "--before option value -b Add an option before DHCP data\n"; |
| | 335 | print STDERR "--after option value -a Add an option after DHCP data\n"; |
| | 336 | print STDERR "--delete option -d Delete an option\n"; |
| | 337 | print STDERR "--list -l List set options\n"; |
| | 338 | print STDERR "--dry-run -n Don't modify the target file\n"; |
| | 339 | print STDERR "--help -h Display this help text\n"; |
| | 340 | print STDERR "\n"; |
| | 341 | print STDERR "The following DHCP options are currently recognized:\n"; |
| | 342 | printf STDERR "%-23s %-3s %s\n", 'Name', 'Num', 'Value Format'; |
| | 343 | |
| | 344 | foreach $i (sort { $a <=> $b } keys(%option_names)) { |
| | 345 | printf STDERR "%-23s %3d %s\n", |
| | 346 | $option_names{$i}, $i, $option_format{$i}[0]; |
| | 347 | } |
| 331 | 348 | } |
| 332 | 349 | |