diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-13 14:53:49 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-13 14:53:49 +0100 |
| commit | 03d81ef43aca1808255d1a2a19ec394ed805eee8 (patch) | |
| tree | fb403a137eccec85234719e4a2acff56adaf4b4e /shell | |
| parent | 03dad22f8a1b8b1410fdcccf69af1bb5cce4de7c (diff) | |
| download | busybox-w32-03d81ef43aca1808255d1a2a19ec394ed805eee8.tar.gz busybox-w32-03d81ef43aca1808255d1a2a19ec394ed805eee8.tar.bz2 busybox-w32-03d81ef43aca1808255d1a2a19ec394ed805eee8.zip | |
builtin_read: note about better implementation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/builtin_read.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/builtin_read.c b/shell/builtin_read.c index 412bcf869..73b0949cf 100644 --- a/shell/builtin_read.c +++ b/shell/builtin_read.c | |||
| @@ -20,6 +20,11 @@ | |||
| 20 | #include "shell_common.h" | 20 | #include "shell_common.h" |
| 21 | #include "builtin_read.h" | 21 | #include "builtin_read.h" |
| 22 | 22 | ||
| 23 | //TODO: use more efficient setvar() which takes a pointer to malloced "VAR=VAL" | ||
| 24 | //string. hush naturally has it, and ash has setvareq(). | ||
| 25 | //Here we can simply store "VAR=" at buffer start and store read data directly | ||
| 26 | //after "=", then pass buffer to setvar() to consume. | ||
| 27 | |||
| 23 | const char* FAST_FUNC | 28 | const char* FAST_FUNC |
| 24 | shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val), | 29 | shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val), |
| 25 | char **argv, | 30 | char **argv, |
