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