/bootable/recovery/otautil/include/otautil/ |
D | rangeset.h | 26 using Range = std::pair<size_t, size_t>; 47 size_t GetBlockNumber(size_t idx) const; 57 std::optional<RangeSet> GetSubRanges(size_t start_index, size_t num_of_blocks) const; 65 std::vector<RangeSet> Split(size_t groups) const; 68 size_t size() const { in size() 73 size_t blocks() const { in blocks() 115 const Range& operator[](size_t i) const { 131 size_t blocks_; 147 static constexpr size_t kBlockSize = 4096; 160 void Insert(size_t start, size_t len); [all …]
|
/bootable/deprecated-ota/applypatch/ |
D | imgpatch.cpp | 53 static bool ApplyBSDiffPatchAndStreamOutput(const uint8_t* src_data, size_t src_len, in ApplyBSDiffPatchAndStreamOutput() 54 const Value& patch, size_t patch_offset, in ApplyBSDiffPatchAndStreamOutput() 56 size_t expected_target_length = static_cast<size_t>(Read8(deflate_header + 32)); in ApplyBSDiffPatchAndStreamOutput() 57 CHECK_GT(expected_target_length, static_cast<size_t>(0)); in ApplyBSDiffPatchAndStreamOutput() 78 size_t actual_target_length = 0; in ApplyBSDiffPatchAndStreamOutput() 79 size_t total_written = 0; in ApplyBSDiffPatchAndStreamOutput() 80 static constexpr size_t buffer_size = 32768; in ApplyBSDiffPatchAndStreamOutput() 82 &ret, &sink](const uint8_t* data, size_t len) -> size_t { in ApplyBSDiffPatchAndStreamOutput() 101 size_t have = buffer_size - strm.avail_out; in ApplyBSDiffPatchAndStreamOutput() 135 int ApplyImagePatch(const unsigned char* old_data, size_t old_size, const unsigned char* patch_data, in ApplyImagePatch() [all …]
|
D | imgdiff.cpp | 175 static constexpr size_t VERSION = 2; 180 static constexpr size_t BLOCK_SIZE = 4096; 181 static constexpr size_t BUFFER_SIZE = 0x8000; 197 static bool AlignHead(size_t* start, size_t* length) { in AlignHead() 198 size_t residual = (*start % BLOCK_SIZE == 0) ? 0 : BLOCK_SIZE - *start % BLOCK_SIZE; in AlignHead() 211 static bool AlignTail(size_t* start, size_t* length) { in AlignTail() 212 size_t residual = (*start + *length) % BLOCK_SIZE; in AlignTail() 226 static bool RemoveUsedBlocks(size_t* start, size_t* length, const SortedRangeSet& used_ranges) { in RemoveUsedBlocks() 258 ImageChunk::ImageChunk(int type, size_t start, const std::vector<uint8_t>* file_content, in ImageChunk() 259 size_t raw_data_len, std::string entry_name) in ImageChunk() [all …]
|
/bootable/deprecated-ota/applypatch/include/applypatch/ |
D | imgdiff_image.h | 41 ImageChunk(int type, size_t start, const std::vector<uint8_t>* file_content, size_t raw_data_len, 49 size_t GetRawDataLength() const { in GetRawDataLength() 55 size_t GetStartOffset() const { in GetStartOffset() 65 size_t DataLengthForPatch() const; 67 void Dump(size_t index) const; 107 size_t start_; // offset of chunk in the original input file 109 size_t raw_data_len_; 129 static bool RawDataIsSmaller(const ImageChunk& tgt, size_t patch_size); 135 size_t PatchSize() const; 140 size_t GetHeaderSize() const; [all …]
|
D | applypatch.h | 38 using SinkFn = std::function<size_t(const unsigned char*, size_t)>; 51 Partition(const std::string& name, size_t size, const std::string& hash) in Partition() 66 size_t size; 109 int ApplyBSDiffPatch(const unsigned char* old_data, size_t old_size, const Value& patch, 110 size_t patch_offset, SinkFn sink); 117 int ApplyImagePatch(const unsigned char* old_data, size_t old_size, const Value& patch, SinkFn sink, 125 bool CheckAndFreeSpaceOnCache(size_t bytes); 129 bool RemoveFilesInDirectory(size_t bytes_needed, const std::string& dirname,
|
D | imgpatch.h | 24 using SinkFn = std::function<size_t(const unsigned char*, size_t)>; 26 int ApplyImagePatch(const unsigned char* old_data, size_t old_size, const unsigned char* patch_data, 27 size_t patch_size, SinkFn sink);
|
/bootable/recovery/otautil/ |
D | rangeset.cpp | 54 size_t num; in Parse() 55 if (!android::base::ParseUint(pieces[0], &num, static_cast<size_t>(INT_MAX))) { in Parse() 73 for (size_t i = 0; i < num; i += 2) { in Parse() 74 size_t first; in Parse() 75 size_t second; in Parse() 76 if (!android::base::ParseUint(pieces[i + 1], &first, static_cast<size_t>(INT_MAX)) || in Parse() 77 !android::base::ParseUint(pieces[i + 2], &second, static_cast<size_t>(INT_MAX))) { in Parse() 90 size_t sz = range.second - range.first; in PushBack() 106 std::vector<RangeSet> RangeSet::Split(size_t groups) const { in Split() 114 size_t mean = blocks_ / groups; in Split() [all …]
|
D | asn1_decoder.cpp | 37 bool asn1_context::skip_bytes(size_t num_skip) { in skip_bytes() 46 bool asn1_context::decode_length(size_t* out_len) { in decode_length() 56 if (static_cast<size_t>(num_octets) >= sizeof(size_t)) { in decode_length() 59 size_t length = 0; in decode_length() 80 size_t length; in asn1_constructed_get() 93 size_t length; in asn1_constructed_skip_all() 110 size_t length; in asn1_sequence_get() 121 size_t length; in asn1_set_get() 129 size_t length; in asn1_sequence_next() 136 bool asn1_context::asn1_oid_get(const uint8_t** oid, size_t* length) { in asn1_oid_get() [all …]
|
/bootable/libbootloader/gbl/libefi/defs/ |
D | boot_service.h | 63 EfiStatus (*allocate_pages)(EfiAllocatorType type, EfiMemoryType memory_type, size_t pages, 65 EfiStatus (*free_pages)(EfiPhysicalAddr memory, size_t pages); 66 EfiStatus (*get_memory_map)(size_t* memory_map_size, EfiMemoryDescriptor* memory_map, 67 size_t* map_key, size_t* desc_size, uint32_t* desc_version); 68 EfiStatus (*allocate_pool)(EfiMemoryType pool_type, size_t size, void** buf); 73 EfiStatus (*wait_for_event)(size_t num_events, EfiEvent* event, size_t* index); 87 void* search_key, size_t* buf_size, EfiHandle* buf); 92 EfiDevicePathProtocol* path, void* src, size_t src_size, 94 EfiStatus (*start_image)(EfiHandle image_handle, size_t* exit_data_size, char16_t** exit_data); 95 EfiStatus (*exit)(EfiHandle image_handle, EfiStatus exit_status, size_t exit_data_size, [all …]
|
D | runtime_service.h | 12 EfiStatus (*set_virtual_address_map)(size_t memory_map_size, 13 size_t descriptor_size, 16 EfiStatus (*convert_pointer)(size_t debug_disposition, void** address); 19 size_t* data_size, void* data); 20 EfiStatus (*get_next_variable_name)(size_t* variable_name_size, 25 size_t data_size, void* data); 28 size_t data_size, void* reset_data); 30 size_t capsule_count, 33 EfiCapsuleHeader** capsule_header_array, size_t capsule_count,
|
/bootable/libbootloader/gbl/efi/arch/riscv64/ |
D | deps.cpp | 27 int memcmp(const void* s1, const void* s2, size_t count) { in memcmp() 30 for (size_t i = 0; i < count; i++) { in memcmp() 39 void* memmove(void* dest, void const* src, size_t count) { in memmove() 43 for (size_t i = 0; i < count; i++) { in memmove() 47 for (size_t i = count; i > 0; i--) { in memmove() 54 size_t strlen(const char* str) { in strlen() 55 size_t i = 0; in strlen() 61 void* memset(void* ptr, int value, size_t num) { in memset() 63 for (size_t i = 0; i < num; i++) { in memset() 69 void* memcpy(void* dest, const void* src, size_t num) { in memcpy()
|
/bootable/recovery/recovery_ui/include/recovery_ui/ |
D | screen_ui.h | 86 size_t selection() const; 96 Menu(size_t initial_selection, const DrawInterface& draw_func); 98 size_t selection_; 108 TextMenu(bool scrollable, size_t max_items, size_t max_length, 110 size_t initial_selection, int char_height, const DrawInterface& draw_funcs); 121 size_t ItemsCount() const; 124 size_t MenuStart() const; 127 size_t MenuEnd() const; 141 std::string TextItem(size_t index) const; 151 const size_t max_display_items_; [all …]
|
/bootable/recovery/minui/include/minui/ |
D | minui.h | 37 static constexpr size_t kSurfaceDataAlignment = 8; 45 static std::unique_ptr<GRSurface> Create(size_t width, size_t height, size_t row_bytes, 46 size_t pixel_bytes); 59 size_t data_size() const { in data_size() 63 size_t width; 64 size_t height; 65 size_t row_bytes; 66 size_t pixel_bytes; 69 GRSurface(size_t width, size_t height, size_t row_bytes, size_t pixel_bytes) in GRSurface() 81 size_t data_size_;
|
/bootable/deprecated-ota/updater/include/private/ |
D | commands.h | 47 size_t blocks() const { in blocks() 73 size_t blocks() const { in blocks() 123 std::vector<uint8_t>* buffer, size_t block_size, 132 void DumpBuffer(const std::vector<uint8_t>& buffer, size_t block_size) const; 138 size_t blocks() const { in blocks() 161 size_t blocks_{ 0 }; 170 PatchInfo(size_t offset, size_t length) : offset_(offset), length_(length) {} in PatchInfo() 172 size_t offset() const { in offset() 176 size_t length() const { in length() 185 size_t offset_{ 0 }; [all …]
|
/bootable/libbootloader/gbl/libefi/defs/protocols/ |
D | simple_text_output_protocol.h | 36 EfiStatus (*query_mode)(struct EfiSimpleTextOutputProtocol* self, size_t mode_num, size_t* cols, 37 size_t* rows); 38 EfiStatus (*set_mode)(struct EfiSimpleTextOutputProtocol* self, size_t mode_num); 39 EfiStatus (*set_attribute)(struct EfiSimpleTextOutputProtocol* self, size_t attribute); 41 EfiStatus (*set_cursor_position)(struct EfiSimpleTextOutputProtocol* self, size_t col, 42 size_t row);
|
D | simple_network_protocol.h | 105 EfiStatus (*initialize)(struct EfiSimpleNetworkProtocol* self, size_t extra_rx_buffer_size, 106 size_t extra_tx_buffer_size); 110 uint32_t disable, bool reset_mcast_filter, size_t mcast_filter_count, 114 EfiStatus (*statistics)(struct EfiSimpleNetworkProtocol* self, bool reset, size_t* stats_size, 118 EfiStatus (*nv_data)(struct EfiSimpleNetworkProtocol* self, bool read_write, size_t offset, 119 size_t buf_size, void* buf); 122 EfiStatus (*transmit)(struct EfiSimpleNetworkProtocol* self, size_t header_size, size_t buf_size, 124 EfiStatus (*receive)(struct EfiSimpleNetworkProtocol* self, size_t* header_size, size_t* buf_size,
|
/bootable/recovery/otautil/include/private/ |
D | asn1_decoder.h | 25 asn1_context(const uint8_t* buffer, size_t length) : p_(buffer), length_(length), app_type_(0) {} in asn1_context() 32 bool asn1_oid_get(const uint8_t** oid, size_t* length); 33 bool asn1_octet_string_get(const uint8_t** octet_string, size_t* length); 48 bool skip_bytes(size_t num_skip); 49 bool decode_length(size_t* out_len); 52 size_t length_;
|
/bootable/recovery/tests/unit/ |
D | asn1_decoder_test.cpp | 37 size_t length; in TEST() 61 size_t length; in TEST() 72 size_t length; in TEST() 89 size_t length; in TEST() 107 size_t length; in TEST() 117 size_t length; in TEST() 135 size_t length; in TEST() 145 size_t length; in TEST() 155 size_t length; in TEST() 163 size_t length; in TEST() [all …]
|
D | rangeset_test.cpp | 41 ASSERT_EQ(static_cast<size_t>(1), rs.size()); in TEST() 43 ASSERT_EQ(static_cast<size_t>(9), rs.blocks()); in TEST() 46 ASSERT_EQ(static_cast<size_t>(2), rs2.size()); in TEST() 49 ASSERT_EQ(static_cast<size_t>(14), rs2.blocks()); in TEST() 96 ASSERT_EQ(static_cast<size_t>(2), rs.size()); in TEST() 97 ASSERT_EQ(static_cast<size_t>(12), rs.blocks()); in TEST() 109 ASSERT_FALSE(rs.PushBack({ 5, std::numeric_limits<size_t>::max() - 2 })); in TEST() 158 size_t rs6_blocks = rs6.blocks(); in TEST() 166 size_t sum = 0; in TEST() 209 ASSERT_EQ(static_cast<size_t>(1), rs.GetBlockNumber(0)); in TEST() [all …]
|
/bootable/recovery/minui/ |
D | graphics_fbdev.h | 34 static std::unique_ptr<GRSurfaceFbdev> Create(size_t width, size_t height, size_t row_bytes, 35 size_t pixel_bytes); 63 void SetDisplayedFramebuffer(size_t n); 70 size_t displayed_buffer{ 0 };
|
D | events.cpp | 41 constexpr size_t MAX_DEVICES = 16; 42 constexpr size_t MAX_MISC_FDS = 16; 44 constexpr size_t BITS_PER_LONG = sizeof(unsigned long) * 8; 45 constexpr size_t BITS_TO_LONGS(size_t bits) { in BITS_TO_LONGS() 62 static size_t g_ev_count = 0; 63 static size_t g_ev_dev_count = 0; 64 static size_t g_ev_misc_count = 0; 66 static bool test_bit(size_t bit, unsigned long* array) { // NOLINT in test_bit() 99 size_t event_len = event_len_int; in inotify_cb() 113 size_t offset = 0; in inotify_cb() [all …]
|
/bootable/deprecated-ota/tests/unit/host/ |
D | imgdiff_test.cpp | 38 static void verify_patch_header(const std::string& patch, size_t* num_normal, size_t* num_raw, in verify_patch_header() 39 size_t* num_deflate) { in verify_patch_header() 40 const size_t size = patch.size(); in verify_patch_header() 49 size_t normal = 0; in verify_patch_header() 50 size_t raw = 0; in verify_patch_header() 51 size_t deflate = 0; in verify_patch_header() 53 size_t pos = 12; in verify_patch_header() 87 [&](const unsigned char* data, size_t len) { in GenerateTarget() 137 size_t num_normal; in TEST() 138 size_t num_raw; in TEST() [all …]
|
/bootable/libbootloader/gbl/libc/include/ |
D | string.h | 22 size_t strlen(const char * str); 23 void *memchr(const void *ptr, int ch, size_t count); 25 size_t strnlen(const char *s, size_t maxlen);
|
/bootable/recovery/recovery_ui/ |
D | screen_ui.cpp | 63 Menu::Menu(size_t initial_selection, const DrawInterface& draw_func) in Menu() 66 size_t Menu::selection() const { in selection() 70 TextMenu::TextMenu(bool scrollable, size_t max_items, size_t max_length, in TextMenu() 72 size_t initial_selection, int char_height, const DrawInterface& draw_funcs) in TextMenu() 80 CHECK_LE(max_items, static_cast<size_t>(std::numeric_limits<int>::max())); in TextMenu() 83 size_t items_count = scrollable_ ? items.size() : std::min(items.size(), max_display_items_); in TextMenu() 84 for (size_t i = 0; i < items_count; ++i) { in TextMenu() 95 std::string TextMenu::TextItem(size_t index) const { in TextItem() 101 size_t TextMenu::MenuStart() const { in MenuStart() 105 size_t TextMenu::MenuEnd() const { in MenuEnd() [all …]
|
/bootable/recovery/bootloader_message/include/bootloader_message/ |
D | bootloader_message.h | 32 constexpr size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = 0; 33 constexpr size_t VENDOR_SPACE_OFFSET_IN_MISC = 2 * 1024; 34 constexpr size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024; 35 constexpr size_t SYSTEM_SPACE_OFFSET_IN_MISC = 32 * 1024; 36 constexpr size_t SYSTEM_SPACE_SIZE_IN_MISC = 32 * 1024; 181 bool write_misc_partition(const void* p, size_t size, const std::string& misc_blk_device, 182 size_t offset, std::string* err); 223 bool read_wipe_package(std::string* package_data, size_t size, std::string* err);
|