From c78b85020bc7337493b259694239ea64ace8b44e Mon Sep 17 00:00:00 2001 From: Ben Brewer Date: Mon, 2 Jun 2014 10:54:47 +0100 Subject: Print usage in tbdiff-deploy when it's used incorrectly --- tbdiff-deploy/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 +static void +print_usage(const char *name) +{ + printf("Usage: %s \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; } -- cgit v1.2.1