edify extensions for OTA package installation, part 1
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).
diff --git a/edify/main.c b/edify/main.c
index 4d65da2..c959683 100644
--- a/edify/main.c
+++ b/edify/main.c
@@ -158,7 +158,14 @@
printf("parse returned %d\n", error);
if (error == 0) {
char* result = Evaluate(NULL, root);
- printf("result is [%s]\n", result == NULL ? "(NULL)" : result);
+ if (result == NULL) {
+ char* errmsg = GetError();
+ printf("result was NULL, message is: %s\n",
+ (errmsg == NULL ? "(NULL)" : errmsg));
+ ClearError();
+ } else {
+ printf("result is [%s]\n", result);
+ }
}
return 0;
}