summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brewer <ben.brewer@codethink.co.uk>2014-06-02 10:54:47 +0100
committerBen Brewer <ben.brewer@codethink.co.uk>2014-06-04 12:44:01 +0100
commitc78b85020bc7337493b259694239ea64ace8b44e (patch)
tree85182fbda6d7df8267d684af080cb736f1675209
parent73162c1f05f82a493f38dee2c8296c5a70efa1b8 (diff)
downloadtbdiff-c78b85020bc7337493b259694239ea64ace8b44e.tar.gz
Print usage in tbdiff-deploy when it's used incorrectly
-rw-r--r--tbdiff-deploy/main.c9
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;
}