summaryrefslogtreecommitdiffstats
path: root/edify/expr.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-02-14clean up some warnings when building recoveryDoug Zongker1-2/+0
Change-Id: I1541534ee6978ddf8d548433986679ce9507d508
2013-07-09recovery: move log output to stdoutDoug Zongker1-2/+2
Recovery currently has a random mix of messages printed to stdout and messages printed to stderr, which can make logs hard to read. Move everything to stdout. Change-Id: Ie33bd4a9e1272e731302569cdec918e0534c48a6
2012-04-12minor recovery changesDoug Zongker1-1/+1
- add the --just_exit option to make recovery exit normally without doing anything - make it possible to build updater extensions in C++ - add the clear_display command so that the updater binary can request recovery switch to the NONE background UI These are all used to support the notion of using OTA as a factory reflash mechanism. Change-Id: Ib00d1cbf540feff38f52a61a2cf198915b48488c
2010-02-25make StringValue wrapper okay to call on NULLDoug Zongker1-0/+1
The docs say "don't do this", but it's trivial to make safe. Make StringValue(NULL) return NULL instead of crashing. Change-Id: I2221bcb4c98d8adb4e25c764d7bdcfa787822bcf
2010-02-18relocate applypatch; add type system and new functions to edifyDoug Zongker1-45/+116
- Move applypatch to this package (from build). - Add a rudimentary type system to edify: instead of just returning a char*, functions now return a Value*, which is a struct that can carry different types of value (currently just STRING and BLOB). Convert all functions to this new scheme. - Change the one-argument form of package_extract_file to return a Value of the new BLOB type. - Add read_file() to load a local file and return a blob, and sha1_check() to test a blob (or string) against a set of possible sha1s. read_file() uses the file-loading code from applypatch so it can read MTD partitions as well. This is the start of better integration between applypatch and the rest of edify. b/2361316 - VZW Issue PP628: Continuous reset to Droid logo: framework-res.apk update failed (CR LIBtt59130) Change-Id: Ibd038074749a4d515de1f115c498c6c589ee91e5
2010-02-18Filename check and free allocated stringsKenny Root1-0/+3
Make sure file is valid before we try to read it. Also free all the strings we allocate in various functions so we don't leak memory. Change-Id: Ica3c8dae992e73718c79c12ff5d7e315c290caea
2009-06-18add file_getprop() to updaterDoug Zongker1-0/+13
Add a function to read a property from a ".prop"-formatted file (key=value pairs, one per line, ignore # comment lines and blank lines). Move ErrorAbort to the core of edify; it's not specific to updater now that errors aren't stored in the app cookie.
2009-06-13add less_than_int, greater_than_int to edifyDoug Zongker1-0/+53
Add functions less_than_int() and greater_than_int() that interpret their args as ints and do the comparison. ("<" and ">" operators, if implemented, should do string comparison.) This lets us do the build time check currently done by the check_prereq binary.
2009-06-12fixes to edify and updater scriptDoug Zongker1-257/+249
A few more changes to edify: - fix write_raw_image(); my last change neglected to close the write context, so the written image was corrupt. - each expression tracks the span of the source code from which it was compiled, so that assert()'s error message can include the source of the expression that failed. - the 'cookie' argument to each Function is replaced with a State object, which contains the cookie, the source script (for use with the above spans), and the current error message (replacing the global variables that were used for this purpose). - in the recovery image, a new command "ui_print" can be sent back through the command pipe to cause text to appear on the screen. Add a new ui_print() function to print things from scripts. Rename existing "print" function to "stdout".
2009-06-12edify extensions for OTA package installation, part 2Doug Zongker1-1/+1
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.
2009-06-12edify extensions for OTA package installation, part 1Doug Zongker1-0/+95
Adds the following edify functions: mount unmount format show_progress delete delete_recursive package_extract symlink set_perm set_perm_recursive This set is enough to extract and install the system part of a (full) OTA package. Adds the updater binary that extracts an edify script from the OTA package and then executes it. Minor changes to the edify core (adds a sleep() builtin for debugging, adds "." to the set of characters that can appear in an unquoted string).
2009-06-10core of edify, an eventual replacement for amendDoug Zongker1-0/+279
Edify is a simple scripting language for OTA installation, to be used when we move to OTAs being installed via binaries shipped with the package.