summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:57 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:57 +0200
commit032d2f0268b5ae8fb540ca58cb574445bbfac998 (patch)
tree31ded64cf324bc204849a0b8c0142a2d71337068
parent8e357bc7938de268a849e57b091e437c3262382e (diff)
downloadbarebox-032d2f0268b5ae8fb540ca58cb574445bbfac998.tar.gz
barebox-032d2f0268b5ae8fb540ca58cb574445bbfac998.tar.xz
svn_rev_473
add help text
-rw-r--r--common/cmd_edit.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/cmd_edit.c b/common/cmd_edit.c
index 26bb970b2b..9dd6b7727a 100644
--- a/common/cmd_edit.c
+++ b/common/cmd_edit.c
@@ -456,11 +456,9 @@ int do_edit(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
}
break;
case 4:
- printf("<ctrl-d>\n");
save_file(argv[1]);
goto out;
case 3:
- printf("<???????\n");
goto out;
default:
if ((signed char)c != -1)
@@ -472,8 +470,16 @@ out:
return 0;
}
+static char cmd_edit_help[] =
+"Usage: edit <file>\n"
+"This is a very small editor. Its only features are moving the cursor with\n"
+"the usual keys and typing characters.\n"
+"<ctrl-c> quits the editor without saving,\n"
+"<ctrl-d> quits the editor with saving the current file.\n";
+
U_BOOT_CMD_START(edit)
.maxargs = 2,
.cmd = do_edit,
.usage = "edit a file",
+ U_BOOT_CMD_HELP(cmd_edit_help)
U_BOOT_CMD_END