[openwrt/openwrt] scripts: mkhash show -n option in usage

LEDE Commits lede-commits at lists.infradead.org
Mon Nov 9 05:59:55 EST 2020


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/91a0dc5161e25085a01edd66b1d8da19593dcc4a

commit 91a0dc5161e25085a01edd66b1d8da19593dcc4a
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Thu Jul 16 17:43:30 2020 -1000

    scripts: mkhash show -n option in usage
    
    The -n option prints the filename of hashed files next to the calculated
    checksum. Reflect that in the usage message.
    
    user at dawn:~/src/openwrt/openwrt$ ./a.out md5 -n .config
    eb06db36e7b6751cb18801945e46bf5d .config
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 scripts/mkhash.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/mkhash.c b/scripts/mkhash.c
index 0f5815f242..e26ca3a350 100644
--- a/scripts/mkhash.c
+++ b/scripts/mkhash.c
@@ -736,7 +736,10 @@ static int usage(const char *progname)
 {
 	int i;
 
-	fprintf(stderr, "Usage: %s <hash type> [<file>...]\n"
+	fprintf(stderr, "Usage: %s <hash type> [options] [<file>...]\n"
+		"Options:\n"
+		"	-n		Print filename(s)\n"
+		"\n"
 		"Supported hash types:", progname);
 
 	for (i = 0; i < ARRAY_SIZE(types); i++)



More information about the lede-commits mailing list