diff options
author | Doug Zongker <dougz@android.com> | 2009-06-18 21:57:25 +0200 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-06-18 21:57:25 +0200 |
commit | f8aaf0a77f72cc5614d9b9135c0d00f8a8160f20 (patch) | |
tree | e27402e11be01960b069a265e9e0a1078319b1ac /edify/expr.c | |
parent | resolved conflicts for merge of fb2e3af3 to master (diff) | |
parent | add file_getprop() to updater (diff) | |
download | android_bootable_recovery-f8aaf0a77f72cc5614d9b9135c0d00f8a8160f20.tar android_bootable_recovery-f8aaf0a77f72cc5614d9b9135c0d00f8a8160f20.tar.gz android_bootable_recovery-f8aaf0a77f72cc5614d9b9135c0d00f8a8160f20.tar.bz2 android_bootable_recovery-f8aaf0a77f72cc5614d9b9135c0d00f8a8160f20.tar.lz android_bootable_recovery-f8aaf0a77f72cc5614d9b9135c0d00f8a8160f20.tar.xz android_bootable_recovery-f8aaf0a77f72cc5614d9b9135c0d00f8a8160f20.tar.zst android_bootable_recovery-f8aaf0a77f72cc5614d9b9135c0d00f8a8160f20.zip |
Diffstat (limited to '')
-rw-r--r-- | edify/expr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/edify/expr.c b/edify/expr.c index f1c555552..72e5100f3 100644 --- a/edify/expr.c +++ b/edify/expr.c @@ -417,3 +417,16 @@ char** ReadVarArgs(State* state, int argc, Expr* argv[]) { } return args; } + +// Use printf-style arguments to compose an error message to put into +// *state. Returns NULL. +char* ErrorAbort(State* state, char* format, ...) { + char* buffer = malloc(4096); + va_list v; + va_start(v, format); + vsnprintf(buffer, 4096, format, v); + va_end(v); + free(state->errmsg); + state->errmsg = buffer; + return NULL; +} |