diff mbox

[05/13] tools: describe the options in the help printout

Message ID 1465979400-2964-6-git-send-email-adrian@lisas.de
State Accepted
Headers show

Commit Message

Adrian Reber June 15, 2016, 8:29 a.m. UTC
(cherry picked from commit e6369bb10bf7e38573ffa78196b74d889f5272c6)

Cherry picked from https://lisas.de/~adrian/slof/slof.git/

Signed-off-by: Adrian Reber <adrian@lisas.de>
---
 tools/sloffs.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tools/sloffs.c b/tools/sloffs.c
index 8d40e49..34a10c5 100644
--- a/tools/sloffs.c
+++ b/tools/sloffs.c
@@ -119,6 +119,12 @@  usage(void)
 	printf("sloffs lists or changes a SLOF flash image\n\n");
 	printf("Usage:\n");
 	printf("  sloffs [OPTION]... [FILE]\n\n");
+	printf("Options:\n");
+	printf("  -h, --help      show this help, then exit\n");
+	printf("  -l, --list      print a listing of all files in the image\n");
+	printf("  -v, --version   print the version, then exit\n");
+	printf("  -d, --dump      dump the information from the header\n");
+	printf("\n");
 	exit(1);
 }
 
@@ -132,9 +138,10 @@  main(int argc, char *argv[])
 		{ "help", 0, NULL, 'h' },
 		{ "list", 0, NULL, 'l' },
 		{ "version", 0, NULL, 'v' },
+		{ "dump", 0, NULL, 'd' },
 		{ 0, 0, 0, 0 }
 	};
-	const char *soption = "hlv";
+	const char *soption = "dhlv";
 	int c;
 	char mode;