Add -F option to specify remote filename
This commit is contained in:
parent
54e4724b9a
commit
4247a2870f
1 changed files with 5 additions and 1 deletions
6
main.c
6
main.c
|
@ -34,6 +34,7 @@ void usage(FILE *fp)
|
|||
" -a <ipaddr> IP address to assign to target device\n"
|
||||
" -c <command> Command to run before (or instead of) TFTP upload\n"
|
||||
" -f <firmware> Firmware file\n"
|
||||
" -F <filename> Remote filename to use during TFTP upload\n"
|
||||
" -i <interface> Network interface directly connected to device\n"
|
||||
" -m <mac> MAC address of target device (xx:xx:xx:xx:xx:xx)\n"
|
||||
" -M <netmask> Subnet mask to assign to target device\n"
|
||||
|
@ -93,7 +94,7 @@ int main(int argc, char **argv)
|
|||
|
||||
opterr = 0;
|
||||
|
||||
while ((c = getopt(argc, argv, "a:c:f:i:m:M:p:t:T:hLVvU")) != -1) {
|
||||
while ((c = getopt(argc, argv, "a:c:f:F:i:m:M:p:t:T:hLVvU")) != -1) {
|
||||
max = 0x7fffffff;
|
||||
switch (c) {
|
||||
case 'a':
|
||||
|
@ -105,6 +106,9 @@ int main(int argc, char **argv)
|
|||
case 'f':
|
||||
args.file_local = optarg;
|
||||
break;
|
||||
case 'F':
|
||||
args.file_remote = optarg;
|
||||
break;
|
||||
case 'i':
|
||||
args.intf = optarg;
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue