From fd1cbd241397bbfd2787551166f8661d761fd3ef Mon Sep 17 00:00:00 2001 From: Klaus Kaempf Date: Thu, 14 Feb 2008 12:26:29 +0000 Subject: [PATCH] add "-h" for help --- tools/mergesolv.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/mergesolv.c b/tools/mergesolv.c index 14a466a..f770fbd 100644 --- a/tools/mergesolv.c +++ b/tools/mergesolv.c @@ -22,6 +22,17 @@ #include "repo_solv.h" #include "common_write.h" +static void +usage() +{ + fprintf(stderr, "\nUsage:\n" + "mergesolv [file] [file] [...]\n" + " merges multiple solv files into one and writes it to stdout\n" + ); + exit(0); +} + + int main(int argc, char **argv) { @@ -33,6 +44,8 @@ main(int argc, char **argv) { FILE *fp; argv++; + if (!strcmp(*argv,"-h")) + usage(); if ((fp = fopen(*argv, "r")) == NULL) { perror(argv[1]); -- 2.7.4