projects
/
project
/
uclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
example: document -O
[project/uclient.git]
/
uclient-example.c
diff --git
a/uclient-example.c
b/uclient-example.c
index 7c54ce3429efc5fd20bb8b64f38ec1c7b250f584..32fc314a5ceb011c41c28071f6805fb4899ab7d3 100644
(file)
--- a/
uclient-example.c
+++ b/
uclient-example.c
@@
-98,11
+98,11
@@
static void example_header_done(struct uclient *cl)
output_fd = open_output_file(cl->url->location, true);
if (output_fd < 0) {
output_fd = open_output_file(cl->url->location, true);
if (output_fd < 0) {
- if (!quiet)
{
+ if (!quiet)
perror("Cannot open output file");
perror("Cannot open output file");
-
error_ret = 3;
-
uloop_end(
);
- }
+ error_ret = 3;
+
uclient_disconnect(cl
);
+ uloop_end();
}
}
}
}
@@
-181,6
+181,7
@@
static int usage(const char *progname)
fprintf(stderr,
"Usage: %s [options] <URL>\n"
"Options:\n"
fprintf(stderr,
"Usage: %s [options] <URL>\n"
"Options:\n"
+ " -O <file>: Redirect output to file (use \"-\" for stdout)\n"
"\n"
"HTTPS options:\n"
" --ca-certificate=<cert>: Load CA certificates from file <cert>\n"
"\n"
"HTTPS options:\n"
" --ca-certificate=<cert>: Load CA certificates from file <cert>\n"