summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2010-01-13 14:53:49 +0100
committerDenys Vlasenko2010-01-13 14:53:49 +0100
commit03d81ef43aca1808255d1a2a19ec394ed805eee8 (patch)
treefb403a137eccec85234719e4a2acff56adaf4b4e
parent03dad22f8a1b8b1410fdcccf69af1bb5cce4de7c (diff)
downloadbusybox-03d81ef43aca1808255d1a2a19ec394ed805eee8.zip
busybox-03d81ef43aca1808255d1a2a19ec394ed805eee8.tar.gz
builtin_read: note about better implementation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/builtin_read.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/builtin_read.c b/shell/builtin_read.c
index 412bcf8..73b0949 100644
--- a/shell/builtin_read.c
+++ b/shell/builtin_read.c
@@ -20,6 +20,11 @@
#include "shell_common.h"
#include "builtin_read.h"
+//TODO: use more efficient setvar() which takes a pointer to malloced "VAR=VAL"
+//string. hush naturally has it, and ash has setvareq().
+//Here we can simply store "VAR=" at buffer start and store read data directly
+//after "=", then pass buffer to setvar() to consume.
+
const char* FAST_FUNC
shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
char **argv,