Home
last modified time | relevance | path

Searched refs:state (Results 1 – 8 of 8) sorted by relevance

/bootable/recovery/edify/
Dexpr.h65 typedef Value* (*Function)(const char* name, State* state,
79 Value* EvaluateValue(State* state, Expr* expr);
86 char* Evaluate(State* state, Expr* expr);
89 Value* Literal(const char* name, State* state, int argc, Expr* argv[]);
94 Value* ConcatFn(const char* name, State* state, int argc, Expr* argv[]);
95 Value* LogicalAndFn(const char* name, State* state, int argc, Expr* argv[]);
96 Value* LogicalOrFn(const char* name, State* state, int argc, Expr* argv[]);
97 Value* LogicalNotFn(const char* name, State* state, int argc, Expr* argv[]);
98 Value* SubstringFn(const char* name, State* state, int argc, Expr* argv[]);
99 Value* EqualityFn(const char* name, State* state, int argc, Expr* argv[]);
[all …]
Dexpr.cpp40 char* Evaluate(State* state, Expr* expr) { in Evaluate() argument
41 Value* v = expr->fn(expr->name, state, expr->argc, expr->argv); in Evaluate()
44 ErrorAbort(state, kArgsParsingFailure, "expecting string, got value type %d", v->type); in Evaluate()
53 Value* EvaluateValue(State* state, Expr* expr) { in EvaluateValue() argument
54 return expr->fn(expr->name, state, expr->argc, expr->argv); in EvaluateValue()
72 Value* ConcatFn(const char* name, State* state, int argc, Expr* argv[]) { in ConcatFn() argument
84 strings[i] = Evaluate(state, argv[i]); in ConcatFn()
108 Value* IfElseFn(const char* name, State* state, int argc, Expr* argv[]) { in IfElseFn() argument
110 free(state->errmsg); in IfElseFn()
111 state->errmsg = strdup("ifelse expects 2 or 3 arguments"); in IfElseFn()
[all …]
Dmain.cpp42 State state; in expect() local
43 state.cookie = NULL; in expect()
44 state.script = strdup(expr_str); in expect()
45 state.errmsg = NULL; in expect()
47 result = Evaluate(&state, e); in expect()
48 free(state.errmsg); in expect()
49 free(state.script); in expect()
204 State state; in main() local
205 state.cookie = NULL; in main()
206 state.script = buffer; in main()
[all …]
/bootable/recovery/updater/
Dinstall.cpp66 static void uiPrint(State* state, const std::string& buffer) { in uiPrint() argument
67 UpdaterInfo* ui = reinterpret_cast<UpdaterInfo*>(state->cookie); in uiPrint()
86 void uiPrintf(State* state, const char* format, ...) { in uiPrintf() argument
94 uiPrint(state, error_msg); in uiPrintf()
114 Value* MountFn(const char* name, State* state, int argc, Expr* argv[]) { in MountFn() argument
117 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 4-5 args, got %d", name, argc); in MountFn()
127 if (ReadArgs(state, argv, 5, &fs_type, &partition_type, in MountFn()
133 if (ReadArgs(state, argv, 4, &fs_type, &partition_type, in MountFn()
140 ErrorAbort(state, kArgsParsingFailure, "fs_type argument to %s() can't be empty", name); in MountFn()
144 ErrorAbort(state, kArgsParsingFailure, "partition_type argument to %s() can't be empty", in MountFn()
[all …]
Dupdater.cpp140 State state; in main() local
141 state.cookie = &updater_info; in main()
142 state.script = script; in main()
143 state.errmsg = NULL; in main()
147 state.is_retry = true; in main()
153 char* result = Evaluate(&state, root); in main()
160 if (state.errmsg == NULL) { in main()
164 printf("script aborted: %s\n", state.errmsg); in main()
165 char* line = strtok(state.errmsg, "\n"); in main()
170 if (sscanf(line, "E%u: ", &state.error_code) != 1) { in main()
[all …]
Dblockimg.cpp715 static int CreateStash(State* state, int maxblocks, const char* blockdev, std::string& base) { in CreateStash() argument
732 ErrorAbort(state, kStashCreationFailure, "stat \"%s\" failed: %s\n", in CreateStash()
740 ErrorAbort(state, kStashCreationFailure, "mkdir \"%s\" failed: %s\n", in CreateStash()
746 ErrorAbort(state, kStashCreationFailure, "not enough space for stash\n"); in CreateStash()
766 ErrorAbort(state, kStashCreationFailure, "not enough space for stash (%d more needed)\n", in CreateStash()
1383 static Value* PerformBlockImageUpdate(const char* name, State* state, int /* argc */, Expr* argv[], in PerformBlockImageUpdate() argument
1390 if (state->is_retry) { in PerformBlockImageUpdate()
1399 if (ReadValueArgs(state, argv, 4, &blockdev_filename, &transfer_list_value, in PerformBlockImageUpdate()
1411 ErrorAbort(state, kArgsParsingFailure, "blockdev_filename argument to %s must be string", in PerformBlockImageUpdate()
1416 ErrorAbort(state, kArgsParsingFailure, "transfer_list argument to %s must be blob", name); in PerformBlockImageUpdate()
[all …]
Dinstall.h23 void uiPrintf(State* state, const char* format, ...);
/bootable/recovery/
DNOTICE143 5. Submission of Contributions. Unless You explicitly state otherwise,