diff options
author | Ben Brewer <ben.brewer@codethink.co.uk> | 2014-06-02 10:54:47 +0100 |
---|---|---|
committer | Ben Brewer <ben.brewer@codethink.co.uk> | 2014-06-02 15:53:43 +0100 |
commit | e818b38f7d4c9b0f6491f43151f719bf7392b86c (patch) | |
tree | ce3beec05b41bc230e9072e6760e7c953927e67e | |
parent | fa650af37914be8195aa7fc7e20c1c4b2801afd3 (diff) | |
download | tbdiff-e818b38f7d4c9b0f6491f43151f719bf7392b86c.tar.gz |
Print usage in tbdiff-deploy when it's used incorrectly
-rw-r--r-- | tbdiff-deploy/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tbdiff-deploy/main.c b/tbdiff-deploy/main.c index 3f7691c..283c5b4 100644 --- a/tbdiff-deploy/main.c +++ b/tbdiff-deploy/main.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2012 Codethink Ltd. + * Copyright (C) 2011-2014 Codethink Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as @@ -25,12 +25,19 @@ #include <tbdiff/tbdiff.h> +static void +print_usage(const char *name) +{ + printf("Usage: %s <patch-stream>\n", name); +} + int main(int argc, char **argv) { if(argc < 2) { fprintf(stderr, "Error: No patch stream specified.\n"); + print_usage(argv[0]); return EXIT_FAILURE; } |