mirror of
https://xff.cz/git/u-boot/
synced 2025-10-22 10:31:56 +02:00
tools: env: shift optind arguments and fix argument indices
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
This commit is contained in:
committed by
Tom Rini
parent
371ee13760
commit
1ce686978c
4
tools/env/fw_env_main.c
vendored
4
tools/env/fw_env_main.c
vendored
@@ -182,6 +182,10 @@ int main(int argc, char *argv[])
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* shift parsed flags, jump to non-option arguments */
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
lockfd = open(lockname, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||
if (-1 == lockfd) {
|
||||
fprintf(stderr, "Error opening lock file %s\n", lockname);
|
||||
|
Reference in New Issue
Block a user