From 8edb00c990e563e6f91b278a212f2edf877cf763 Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Thu, 11 Jun 2009 17:21:44 -0700 Subject: edify extensions for OTA package installation, part 2 Adds more edify functions for OTAs: is_mounted getprop apply_patch apply_patch_check apply_patch_space write_raw_image write_firmware_image package_extract_file This allows us to install radios, hboots, boot images, and install incremental OTA packages. Fixes a couple of dumb bugs in edify itself: - we were doubling the size of the function table each time it was *not* full, rather than each time it was full - "no such function" errors weren't visible to the parser, so they didn't prevent execution of the script. --- edify/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'edify/main.c') diff --git a/edify/main.c b/edify/main.c index c95968376..7da89e2ea 100644 --- a/edify/main.c +++ b/edify/main.c @@ -153,10 +153,11 @@ int main(int argc, char** argv) { buffer[size] = '\0'; Expr* root; + int error_count = 0; yy_scan_bytes(buffer, size); - int error = yyparse(&root); - printf("parse returned %d\n", error); - if (error == 0) { + int error = yyparse(&root, &error_count); + printf("parse returned %d; %d errors encountered\n", error, error_count); + if (error == 0 || error_count > 0) { char* result = Evaluate(NULL, root); if (result == NULL) { char* errmsg = GetError(); -- cgit v1.2.3