diff options
author | sascha <sascha@nomad.localdomain> | 2007-10-19 11:28:58 +0200 |
---|---|---|
committer | sascha <sascha@nomad.localdomain> | 2007-10-19 11:28:58 +0200 |
commit | 8a46c1102f7772a5c890da6512988d09c33686a2 (patch) | |
tree | 731758bfaa3153b6fd79be44a0b290779e61524c /common | |
parent | 95db50e812816127caf570449205a80cd626c263 (diff) | |
download | barebox-8a46c1102f7772a5c890da6512988d09c33686a2.tar.gz barebox-8a46c1102f7772a5c890da6512988d09c33686a2.tar.xz |
move readline command to a file of its own
Diffstat (limited to 'common')
-rw-r--r-- | common/command.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/common/command.c b/common/command.c index c78da7e3a5..40ac8de981 100644 --- a/common/command.c +++ b/common/command.c @@ -73,37 +73,6 @@ U_BOOT_CMD_END #ifdef CONFIG_SHELL_HUSH -static int do_readline (cmd_tbl_t *cmdtp, int argc, char *argv[]) -{ - char *buf = xzalloc(CONFIG_CBSIZE); - - if (argc < 3) { - u_boot_cmd_usage(cmdtp); - return 1; - } - - if (readline(argv[1], buf, CONFIG_CBSIZE) < 0) { - free(buf); - return 1; - } - - setenv(argv[2], buf); - free(buf); - - return 0; -} - -static __maybe_unused char cmd_readline_help[] = -"Usage: readline <prompt> VAR\n" -"readline reads a line of user input into variable VAR.\n"; - -U_BOOT_CMD_START(readline) - .maxargs = 3, - .cmd = do_readline, - .usage = "prompt for user input", - U_BOOT_CMD_HELP(cmd_readline_help) -U_BOOT_CMD_END - static int do_exit (cmd_tbl_t *cmdtp, int argc, char *argv[]) { int r; |