aboutsummaryrefslogtreecommitdiffstats
path: root/updater/updater.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2009-06-11 17:21:44 -0700
committerDoug Zongker <dougz@android.com>2009-06-12 09:40:37 -0700
commit8edb00c990e563e6f91b278a212f2edf877cf763 (patch)
treedcd6c0fb2ce82fcb5b43ed47dc74879cfe71b647 /updater/updater.c
parent9dbc027b5f540bcf23c968398f8a70e92abd56cd (diff)
downloadbootable_recovery-8edb00c990e563e6f91b278a212f2edf877cf763.zip
bootable_recovery-8edb00c990e563e6f91b278a212f2edf877cf763.tar.gz
bootable_recovery-8edb00c990e563e6f91b278a212f2edf877cf763.tar.bz2
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.
Diffstat (limited to 'updater/updater.c')
-rw-r--r--updater/updater.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/updater/updater.c b/updater/updater.c
index aa03803..0977625 100644
--- a/updater/updater.c
+++ b/updater/updater.c
@@ -80,10 +80,11 @@ int main(int argc, char** argv) {
// Parse the script.
Expr* root;
+ int error_count = 0;
yy_scan_string(script);
- int error = yyparse(&root);
- if (error != 0) {
- fprintf(stderr, "%d parse errors\n", error);
+ int error = yyparse(&root, &error_count);
+ if (error != 0 || error_count > 0) {
+ fprintf(stderr, "%d parse errors\n", error_count);
return 6;
}