mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
commandhelper: Split argument parsing and printing
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
9668fd8ebf
commit
d940baaa81
@ -75,8 +75,6 @@ int main(int argc, char **argv) {
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
fprintf(log, "ARG:%s\n", argv[i]);
|
|
||||||
|
|
||||||
if (STREQ(argv[i - 1], "--readfd") &&
|
if (STREQ(argv[i - 1], "--readfd") &&
|
||||||
sscanf(argv[i], "%u%c", &readfds[numreadfds++], &c) != 1) {
|
sscanf(argv[i], "%u%c", &readfds[numreadfds++], &c) != 1) {
|
||||||
printf("Could not parse fd %s\n", argv[i]);
|
printf("Could not parse fd %s\n", argv[i]);
|
||||||
@ -88,6 +86,10 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 1; i < argc; i++) {
|
||||||
|
fprintf(log, "ARG:%s\n", argv[i]);
|
||||||
|
}
|
||||||
|
|
||||||
for (n = 0; environ[n]; n++) {
|
for (n = 0; environ[n]; n++) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user