diff options
Diffstat (limited to 'fb-helper.c')
-rw-r--r-- | fb-helper.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fb-helper.c b/fb-helper.c index 56f9429..11d115e 100644 --- a/fb-helper.c +++ b/fb-helper.c @@ -48,6 +48,7 @@ struct progressData { }; struct options { + int debug; char *url; char *file; }; @@ -238,12 +239,14 @@ int main(int argc, char *argv[]) int opt; struct options options = { + .debug = 0, .file = NULL, .url = NULL }; - while ((opt = getopt(argc, argv, "u:f:m:")) != -1) { + while ((opt = getopt(argc, argv, "Du:f:m:")) != -1) { switch (opt) { + case 'D': options.debug = 1; break; case 'u': options.url = optarg; break; @@ -268,6 +271,10 @@ int main(int argc, char *argv[]) goto cleanup; } + if (options.debug > 0) { + curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); + } + /* if we have a file to upload, add it as a POST request */ if (options.file) { struct stat statbuf; |