← Commit list

03d81ef43

Denys Vlasenko
Denys Vlasenko
2010-01-13
FAILED Duration: 28s

Subject

builtin_read: note about better implementation

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/builtin_read.c+5 -0
@@ -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,