From: Joseph C. Lehner Date: Fri, 12 Feb 2016 13:40:08 +0000 (+0100) Subject: Add -F option to specify remote filename X-Git-Tag: v0.9.2~21 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4247a2870faf8cf75df7d03c8a152b1a189d119a;p=oweals%2Fnmrpflash.git Add -F option to specify remote filename --- diff --git a/main.c b/main.c index a290134..55a046e 100644 --- a/main.c +++ b/main.c @@ -34,6 +34,7 @@ void usage(FILE *fp) " -a IP address to assign to target device\n" " -c Command to run before (or instead of) TFTP upload\n" " -f Firmware file\n" + " -F Remote filename to use during TFTP upload\n" " -i Network interface directly connected to device\n" " -m MAC address of target device (xx:xx:xx:xx:xx:xx)\n" " -M 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;