builtin_read: note about better implementation
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 13 Jan 2010 13:53:49 +0000 (14:53 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 13 Jan 2010 13:53:49 +0000 (14:53 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/builtin_read.c

index 412bcf8699bbd0a88ea1281b8772b512aa7998e2..73b0949cf0b7f58d8ce3044b4ff8669a56c32e1b 100644 (file)
 #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,