summaryrefslogtreecommitdiffstats
path: root/edify/main.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* edify: Switch to C++.Tao Bao2015-08-201-214/+0
| | | | Change-Id: I71aede6e29af1dc4bb858a62016c8035db5d3452
* Remove an uninitialized value.Dan Albert2014-12-181-2/+1
| | | | | | | The assignment of this value was removed in 0d32f25, but the declaration was still there and still tested. Clang issues a warning for this. Change-Id: I748bfb8b4f78ceed1c1b5b1bb80cb4e873e4facc
* clean up some warnings when building recoveryDoug Zongker2014-02-141-5/+2
| | | | Change-Id: I1541534ee6978ddf8d548433986679ce9507d508
* recovery: move log output to stdoutDoug Zongker2013-07-091-5/+5
| | | | | | | | 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
* refactor applypatch and friendsDoug Zongker2010-02-231-1/+2
| | | | | | | | | | | | | | | | | | | Change the applypatch function to take meaningful arguments instead of argc and argv. Move all the parsing of arguments into main.c (for the standalone binary) and into install.c (for the updater function). applypatch() takes patches as Value objects, so we can pass in blobs extracted from the package without ever writing them to temp files. The patching code is changed to read the patch from memory instead of a file. A bunch of compiler warnings (mostly about signed vs unsigned types) are fixed. Support for the IMGDIFF1 format is dropped. (We've been generating IMGDIFF2 packages for some time now.) Change-Id: I217563c500012750f27110db821928a06211323f
* Filename check and free allocated stringsKenny Root2010-02-181-0/+4
| | | | | | | 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
* add less_than_int, greater_than_int to edifyDoug Zongker2009-06-131-0/+10
| | | | | | | 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.
* fixes to edify and updater scriptDoug Zongker2009-06-121-135/+166
| | | | | | | | | | | | | | | | | | | | | 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".
* edify extensions for OTA package installation, part 2Doug Zongker2009-06-121-3/+4
| | | | | | | | | | | | | | | | | | 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 extensions for OTA package installation, part 1Doug Zongker2009-06-121-1/+8
| | | | | | | | | | | | | | | 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).
* core of edify, an eventual replacement for amendDoug Zongker2009-06-101-0/+164
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.