/bootable/recovery/edify/include/edify/ |
D | expr.h | 57 struct Value { struct 63 Value(Type type, std::string str) : type(type), data(std::move(str)) {} in Value() argument 71 using Function = Value* (*)(const char* name, State* state, argument 88 Value* EvaluateValue(State* state, const std::unique_ptr<Expr>& expr); 96 Value* Literal(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 101 Value* ConcatFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 102 Value* LogicalAndFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 103 Value* LogicalOrFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 104 Value* LogicalNotFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 105 Value* SubstringFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); [all …]
|
/bootable/recovery/edify/ |
D | expr.cpp | 50 std::unique_ptr<Value> v(expr->fn(expr->name.c_str(), state, expr->argv)); in Evaluate() 54 if (v->type != Value::Type::STRING) { in Evaluate() 63 Value* EvaluateValue(State* state, const std::unique_ptr<Expr>& expr) { in EvaluateValue() 67 Value* StringValue(const char* str) { in StringValue() 71 return new Value(Value::Type::STRING, str); in StringValue() 74 Value* StringValue(const std::string& str) { in StringValue() 78 Value* ConcatFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in ConcatFn() 94 Value* IfElseFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in IfElseFn() 114 Value* AbortFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in AbortFn() 124 Value* AssertFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in AssertFn() [all …]
|
/bootable/recovery/updater/ |
D | dynamic_partitions.cpp | 45 std::vector<std::unique_ptr<Value>> args; in ReadStringArgs() 53 if (args[i]->type != Value::Type::STRING) { in ReadStringArgs() 66 Value* UnmapPartitionFn(const char* name, State* state, in UnmapPartitionFn() 76 Value* MapPartitionFn(const char* name, State* state, in MapPartitionFn() 89 Value* UpdateDynamicPartitionsFn(const char* name, State* state, in UpdateDynamicPartitionsFn() 95 std::vector<std::unique_ptr<Value>> args; in UpdateDynamicPartitionsFn() 99 const std::unique_ptr<Value>& op_list_value = args[0]; in UpdateDynamicPartitionsFn() 100 if (op_list_value->type != Value::Type::BLOB) { in UpdateDynamicPartitionsFn()
|
D | install.cpp | 84 Value* UIPrintFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in UIPrintFn() 99 Value* PackageExtractFileFn(const char* name, State* state, in PackageExtractFileFn() 185 return new Value(Value::Type::BLOB, buffer); in PackageExtractFileFn() 197 Value* PatchPartitionCheckFn(const char* name, State* state, in PatchPartitionCheckFn() 238 Value* PatchPartitionFn(const char* name, State* state, in PatchPartitionFn() 263 std::vector<std::unique_ptr<Value>> values; in PatchPartitionFn() 264 if (!ReadValueArgs(state, argv, &values, 2, 1) || values[0]->type != Value::Type::BLOB) { in PatchPartitionFn() 281 Value* MountFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in MountFn() 328 Value* IsMountedFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in IsMountedFn() 351 Value* UnmountFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in UnmountFn() [all …]
|
D | blockimg.cpp | 1394 Value patch_value( in PerformCommandDiff() 1395 Value::Type::BLOB, in PerformCommandDiff() 1626 static Value* PerformBlockImageUpdate(const char* name, State* state, in PerformBlockImageUpdate() 1644 std::vector<std::unique_ptr<Value>> args; in PerformBlockImageUpdate() 1654 const std::unique_ptr<Value>& blockdev_filename = args[0]; in PerformBlockImageUpdate() 1655 const std::unique_ptr<Value>& transfer_list_value = args[1]; in PerformBlockImageUpdate() 1656 const std::unique_ptr<Value>& new_data_fn = args[2]; in PerformBlockImageUpdate() 1657 const std::unique_ptr<Value>& patch_data_fn = args[3]; in PerformBlockImageUpdate() 1659 if (blockdev_filename->type != Value::Type::STRING) { in PerformBlockImageUpdate() 1663 if (transfer_list_value->type != Value::Type::BLOB) { in PerformBlockImageUpdate() [all …]
|
D | update_simulator_main.cpp | 47 Value* SimulatorPlaceHolderFn(const char* name, State* /* state */, in SimulatorPlaceHolderFn()
|
/bootable/recovery/applypatch/include/applypatch/ |
D | applypatch.h | 31 struct Value; 79 bool PatchPartition(const Partition& target, const Partition& source, const Value& patch, 80 const Value* bonus, bool backup_source); 109 int ApplyBSDiffPatch(const unsigned char* old_data, size_t old_size, const Value& patch, 117 int ApplyImagePatch(const unsigned char* old_data, size_t old_size, const Value& patch, SinkFn sink, 118 const Value* bonus_data);
|
/bootable/recovery/applypatch/ |
D | applypatch_modes.cpp | 79 Value patch(Value::Type::BLOB, std::move(patch_contents)); in PatchMode() 80 std::unique_ptr<Value> bonus; in PatchMode() 87 bonus = std::make_unique<Value>(Value::Type::BLOB, std::move(bonus_contents)); in PatchMode()
|
D | imgpatch.cpp | 54 const Value& patch, size_t patch_offset, in ApplyBSDiffPatchAndStreamOutput() 137 Value patch(Value::Type::BLOB, in ApplyImagePatch() 142 int ApplyImagePatch(const unsigned char* old_data, size_t old_size, const Value& patch, SinkFn sink, in ApplyImagePatch() 143 const Value* bonus_data) { in ApplyImagePatch()
|
D | applypatch.cpp | 50 const Value& patch, const Value* bonus_data, bool backup_source); 268 bool PatchPartition(const Partition& target, const Partition& source, const Value& patch, in PatchPartition() 269 const Value* bonus, bool backup_source) { in PatchPartition() 329 const Value& patch, const Value* bonus_data, bool backup_source) { in GenerateTarget() 336 if (patch.type != Value::Type::BLOB) { in GenerateTarget()
|
D | bspatch.cpp | 68 int ApplyBSDiffPatch(const unsigned char* old_data, size_t old_size, const Value& patch, in ApplyBSDiffPatch()
|
/bootable/recovery/tests/unit/ |
D | applypatch_test.cpp | 138 Value patch(Value::Type::BLOB, std::string(patch_fc.data.cbegin(), patch_fc.data.cend())); in TEST_F() 142 Value bonus(Value::Type::BLOB, std::string(bonus_fc.data.cbegin(), bonus_fc.data.cend())); in TEST_F() 152 Value patch(Value::Type::BLOB, std::string(patch_fc.data.cbegin(), patch_fc.data.cend())); in TEST_F()
|
D | updater_test.cpp | 115 static Value* BlobToString(const char* name, State* state, in BlobToString() 121 std::vector<std::unique_ptr<Value>> args; in BlobToString() 126 if (args[0]->type != Value::Type::BLOB) { in BlobToString() 130 args[0]->type = Value::Type::STRING; in BlobToString()
|