7e9078
diff -up wrk/wrudf/wrudf.c.wrk wrk/wrudf/wrudf.c
7e9078
--- wrk/wrudf/wrudf.c.wrk	2013-04-15 15:32:03.395528452 +0200
7e9078
+++ wrk/wrudf/wrudf.c	2013-04-15 16:06:37.535546730 +0200
7e9078
@@ -603,6 +603,28 @@ parseCmnd(char* line)
7e9078
     return cmnd;
7e9078
 }
7e9078
 
7e9078
+int show_help()
7e9078
+{
7e9078
+	char *msg = 
7e9078
+	"Interactive tool to maintain an UDF filesystem.\n"
7e9078
+	"Usage:\n"
7e9078
+	"\twrudf [device]\n"
7e9078
+	"Available commands:\n"
7e9078
+	"\tcp\n"
7e9078
+	"\trm\n"
7e9078
+	"\tmkdir\n"
7e9078
+	"\trmdir\n"
7e9078
+	"\tlsc\n"
7e9078
+	"\tlsh\n"
7e9078
+	"\tcdc\n"
7e9078
+	"\tcdh\n"
7e9078
+	"Specify cdh/lsh or cdc/lsc to do cd or ls for Harddisk or CompactDisc.\n"
7e9078
+	"\tquit\n"
7e9078
+	"\texit\n";
7e9078
+	printf("%s", msg);
7e9078
+	return 0;
7e9078
+}
7e9078
+
7e9078
 int
7e9078
 main(int argc, char** argv) 
7e9078
 { 
7e9078
@@ -614,8 +636,14 @@ main(int argc, char** argv)
7e9078
     printf("wrudf " WRUDF_VERSION "\n");
7e9078
     devicename= "/dev/cdrom";
7e9078
 
7e9078
-    if(argc > 1 )
7e9078
+    if(argc > 1 ) {
7e9078
+	if (strcmp(argv[1], "-h")==0 || strcmp(argv[1], "-help")==0 || strcmp(argv[1], "--help")==0) {
7e9078
+	    return show_help();
7e9078
+	}
7e9078
+    }
7e9078
+    else {
7e9078
 	devicename = argv[1];			/* can specify disk image filename */
7e9078
+    }
7e9078
 
7e9078
     if( setpriority(PRIO_PROCESS, 0, -10) ) {
7e9078
 	printf("setpriority(): %m\n");