builtin_read: note about better implementation

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2010-01-13 14:53:49 +01:00
parent 03dad22f8a
commit 03d81ef43a

View File

@ -20,6 +20,11 @@
#include "shell_common.h" #include "shell_common.h"
#include "builtin_read.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 const char* FAST_FUNC
shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val), shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
char **argv, char **argv,