Home
last modified time | relevance | path

Searched refs:hdr (Results 1 – 25 of 60) sorted by relevance

123

/system/core/fastboot/
Dbootimg_utils.cpp61 boot_img_hdr_v3* hdr = reinterpret_cast<boot_img_hdr_v3*>(out->data()); in mkbootimg_v3_and_above() local
63 memcpy(hdr->magic, BOOT_MAGIC, BOOT_MAGIC_SIZE); in mkbootimg_v3_and_above()
64 hdr->kernel_size = kernel.size(); in mkbootimg_v3_and_above()
65 hdr->ramdisk_size = ramdisk.size(); in mkbootimg_v3_and_above()
66 hdr->os_version = src.os_version; in mkbootimg_v3_and_above()
67 hdr->header_size = sizeof(boot_img_hdr_v3); in mkbootimg_v3_and_above()
68 hdr->header_version = src.header_version; in mkbootimg_v3_and_above()
71 auto hdr_v4 = reinterpret_cast<boot_img_hdr_v4*>(hdr); in mkbootimg_v3_and_above()
75 memcpy(hdr->magic + V3_PAGE_SIZE, kernel.data(), kernel.size()); in mkbootimg_v3_and_above()
76 memcpy(hdr->magic + V3_PAGE_SIZE + kernel_actual, ramdisk.data(), ramdisk.size()); in mkbootimg_v3_and_above()
[all …]
Dfastboot_test.cpp24 boot_img_hdr_v1 hdr; in TEST() local
26 hdr = {}; in TEST()
27 fb.ParseOsPatchLevel(&hdr, "2018-01-05"); in TEST()
28 ASSERT_EQ(2018U, 2000U + ((hdr.os_version >> 4) & 0x7f)); in TEST()
29 ASSERT_EQ(1U, ((hdr.os_version >> 0) & 0xf)); in TEST()
31 EXPECT_DEATH(fb.ParseOsPatchLevel(&hdr, "2018"), "should be YYYY-MM-DD"); in TEST()
32 EXPECT_DEATH(fb.ParseOsPatchLevel(&hdr, "2018-01"), "should be YYYY-MM-DD"); in TEST()
33 EXPECT_DEATH(fb.ParseOsPatchLevel(&hdr, "2128-01-05"), "year out of range"); in TEST()
34 EXPECT_DEATH(fb.ParseOsPatchLevel(&hdr, "2018-13-05"), "month out of range"); in TEST()
39 boot_img_hdr_v1 hdr; in TEST() local
[all …]
Dvendor_boot_img_utils.cpp130 [[nodiscard]] Result<uint32_t> get_vendor_boot_header_size(const vendor_boot_img_hdr_v3* hdr) { in get_vendor_boot_header_size() argument
131 if (hdr->header_version == 3) return sizeof(vendor_boot_img_hdr_v3); in get_vendor_boot_header_size()
132 if (hdr->header_version == 4) return sizeof(vendor_boot_img_hdr_v4); in get_vendor_boot_header_size()
133 return Errorf("Unrecognized vendor boot header version {}", hdr->header_version); in get_vendor_boot_header_size()
145 auto hdr = reinterpret_cast<const vendor_boot_img_hdr_v3*>(content.data()); in check_vendor_boot_hdr() local
146 auto expect_header_size = get_vendor_boot_header_size(hdr); in check_vendor_boot_hdr()
152 if (memcmp(hdr->magic, VENDOR_BOOT_MAGIC, VENDOR_BOOT_MAGIC_SIZE) != 0) { in check_vendor_boot_hdr()
155 if (hdr->page_size == 0) { in check_vendor_boot_hdr()
158 if (hdr->header_version < version) { in check_vendor_boot_hdr()
159 return Errorf("Require vendor boot header V{} but is V{}", version, hdr->header_version); in check_vendor_boot_hdr()
[all …]
Dvendor_boot_img_utils_test.cpp290 auto hdr = reinterpret_cast<const vendor_boot_img_hdr_v3*>(new_content.data()); in TEST_P() local
291 ASSERT_EQ(0, memcmp(VENDOR_BOOT_MAGIC, hdr->magic, VENDOR_BOOT_MAGIC_SIZE)); in TEST_P()
292 ASSERT_EQ(GetParam().expected_header_version, hdr->header_version); in TEST_P()
293 EXPECT_EQ(hdr->vendor_ramdisk_size, env->replace->size()); in TEST_P()
294 EXPECT_EQ(hdr->dtb_size, env->dtb->size()); in TEST_P()
296 auto o = round_up(sizeof(vendor_boot_img_hdr_v3), hdr->page_size); in TEST_P()
297 auto p = round_up(hdr->vendor_ramdisk_size, hdr->page_size); in TEST_P()
298 auto q = round_up(hdr->dtb_size, hdr->page_size); in TEST_P()
303 if (hdr->header_version < 4) return; in TEST_P()
305 auto hdr_v4 = static_cast<const vendor_boot_img_hdr_v4*>(hdr); in TEST_P()
[all …]
Dusb_linux.cpp145 struct usb_descriptor_header *hdr = (struct usb_descriptor_header *)_desc; in check() local
148 if(hdr->bLength < size) return -1; in check()
149 if(hdr->bLength > len) return -1; in check()
150 if(hdr->bDescriptorType != type) return -1; in check()
224 struct usb_descriptor_header *hdr = (struct usb_descriptor_header *)ptr; in filter_usb_device() local
225 if (check(hdr, len, USB_DT_INTERFACE, USB_DT_INTERFACE_SIZE) == 0) in filter_usb_device()
227 len -= hdr->bLength; in filter_usb_device()
228 ptr += hdr->bLength; in filter_usb_device()
246 struct usb_descriptor_header *hdr = (struct usb_descriptor_header *)ptr; in filter_usb_device() local
247 if (check(hdr, len, USB_DT_ENDPOINT, USB_DT_ENDPOINT_SIZE) == 0) in filter_usb_device()
[all …]
/system/extras/sound/
Dplaywav.c156 struct wav_header hdr; in wav_play() local
163 if (read(fd, &hdr, sizeof(hdr)) != sizeof(hdr)) { in wav_play()
168 hdr.num_channels, hdr.sample_rate, hdr.bits_per_sample, in wav_play()
169 hdr.audio_format == FORMAT_PCM ? "PCM" : "unknown"); in wav_play()
171 if ((hdr.riff_id != ID_RIFF) || in wav_play()
172 (hdr.riff_fmt != ID_WAVE) || in wav_play()
173 (hdr.fmt_id != ID_FMT)) { in wav_play()
177 if ((hdr.audio_format != FORMAT_PCM) || in wav_play()
178 (hdr.fmt_sz != 16)) { in wav_play()
182 if (hdr.bits_per_sample != 16) { in wav_play()
[all …]
/system/memory/libmemunreachable/
DLeakPipe.cpp27 struct msghdr hdr {}; in SendFd() struct
32 hdr.msg_iov = &iov; in SendFd()
33 hdr.msg_iovlen = 1; in SendFd()
37 hdr.msg_control = cmsgbuf; in SendFd()
38 hdr.msg_controllen = CMSG_LEN(sizeof(int)); in SendFd()
40 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in SendFd()
47 int ret = sendmsg(sock, &hdr, 0); in SendFd()
61 struct msghdr hdr {}; in ReceiveFd() struct
66 hdr.msg_iov = &iov; in ReceiveFd()
67 hdr.msg_iovlen = 1; in ReceiveFd()
[all …]
/system/core/trusty/confirmationui/
DTrustyApp.cpp44 confirmationui_hdr hdr = { in TrustyRpc() local
52 .iov_base = &hdr, in TrustyRpc()
53 .iov_len = sizeof(hdr), in TrustyRpc()
62 if (rc != static_cast<int>(sizeof(hdr) + sizeof(args))) { in TrustyRpc()
68 if (rc != static_cast<int>(sizeof(hdr) + sizeof(args))) { in TrustyRpc()
73 if (hdr.cmd != (CONFIRMATIONUI_CMD_MSG | CONFIRMATIONUI_RESP_BIT)) { in TrustyRpc()
74 LOG(ERROR) << AT << "unknown response command: " << hdr.cmd; in TrustyRpc()
106 confirmationui_hdr hdr = { in TrustyApp() local
114 .iov_base = &hdr, in TrustyApp()
115 .iov_len = sizeof(hdr), in TrustyApp()
[all …]
/system/core/trusty/confirmationui/fuzz/
Dmsg_fuzzer.cpp79 confirmationui_hdr hdr = { in Init() local
87 .iov_base = &hdr, in Init()
88 .iov_len = sizeof(hdr), in Init()
101 if (rc != static_cast<int>(sizeof(hdr) + sizeof(args))) { in Init()
105 rc = read(chan, &hdr, sizeof(hdr)); in Init()
106 if (rc != static_cast<int>(sizeof(hdr))) { in Init()
114 confirmationui_hdr hdr = { in Msg() local
122 .iov_base = &hdr, in Msg()
123 .iov_len = sizeof(hdr), in Msg()
135 if (rc != static_cast<int>(sizeof(hdr) + sizeof(args))) { in Msg()
[all …]
/system/nfc/src/nfa/include/
Dnfa_ee_int.h238 NFC_HDR hdr; member
244 NFC_HDR hdr; member
250 NFC_HDR hdr; member
256 NFC_HDR hdr; member
264 NFC_HDR hdr; member
277 NFC_HDR hdr; member
290 NFC_HDR hdr; member
301 NFC_HDR hdr; member
308 NFC_HDR hdr; member
317 NFC_HDR hdr; member
[all …]
Dnfa_hci_int.h129 NFC_HDR hdr; member
138 NFC_HDR hdr; member
145 NFC_HDR hdr; member
151 NFC_HDR hdr; member
158 NFC_HDR hdr; member
165 NFC_HDR hdr; member
172 NFC_HDR hdr; member
180 NFC_HDR hdr; member
190 NFC_HDR hdr; member
200 NFC_HDR hdr; member
[all …]
Dnfa_dm_int.h70 NFC_HDR hdr; member
77 NFC_HDR hdr; member
83 NFC_HDR hdr; member
91 NFC_HDR hdr; member
98 NFC_HDR hdr; member
107 NFC_HDR hdr; member
113 NFC_HDR hdr; member
123 NFC_HDR hdr; member
131 NFC_HDR hdr; member
137 NFC_HDR hdr; member
[all …]
Dnfa_wlc_int.h71 NFC_HDR hdr; member
78 NFC_HDR hdr; member
84 NFC_HDR hdr; member
92 NFC_HDR hdr; /* For NFA_WLC_API_STOP_EVT */ member
Dnfa_ce_int.h55 NFC_HDR hdr; member
67 NFC_HDR hdr; member
73 NFC_HDR hdr; member
94 NFC_HDR hdr; member
102 NFC_HDR hdr; member
Dnfa_dta_int.h78 NFC_HDR hdr; member
85 NFC_HDR hdr; member
93 NFC_HDR hdr; member
119 NFC_HDR hdr; member
131 NFC_HDR hdr; member
/system/nfc/src/nfa/rw/
Dnfa_rw_api.cc72 p_msg->hdr.event = NFA_RW_OP_REQUEST_EVT; in NFA_RwDetectNDef()
117 p_msg->hdr.event = NFA_RW_OP_REQUEST_EVT; in NFA_RwReadNDef()
159 p_msg->hdr.event = NFA_RW_OP_REQUEST_EVT; in NFA_RwWriteNDef()
194 p_msg->hdr.event = NFA_RW_OP_REQUEST_EVT; in NFA_RwPresenceCheck()
227 p_msg->hdr.event = NFA_RW_OP_REQUEST_EVT; in NFA_RwFormatTag()
282 p_msg->hdr.event = NFA_RW_OP_REQUEST_EVT; in NFA_RwSetTagReadOnly()
339 p_msg->hdr.event = NFA_RW_OP_REQUEST_EVT; in NFA_RwLocateTlv()
380 p_msg->hdr.event = NFA_RW_OP_REQUEST_EVT; in NFA_RwT1tRid()
411 p_msg->hdr.event = NFA_RW_OP_REQUEST_EVT; in NFA_RwT1tReadAll()
442 p_msg->hdr.event = NFA_RW_OP_REQUEST_EVT; in NFA_RwT1tRead()
[all …]
/system/unwinding/libunwindstack/
DElfInterface.cpp297 NhdrType hdr; in ReadBuildID() local
298 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &hdr, sizeof(hdr))) { in ReadBuildID()
301 offset += sizeof(hdr); in ReadBuildID()
303 if (gnu_build_id_size_ - offset < hdr.n_namesz) { in ReadBuildID()
306 if (hdr.n_namesz > 0) { in ReadBuildID()
307 std::string name(hdr.n_namesz, '\0'); in ReadBuildID()
308 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &(name[0]), hdr.n_namesz)) { in ReadBuildID()
317 offset += (hdr.n_namesz + 3) & ~3; in ReadBuildID()
319 if (name == "GNU" && hdr.n_type == NT_GNU_BUILD_ID) { in ReadBuildID()
320 if (gnu_build_id_size_ - offset < hdr.n_descsz || hdr.n_descsz == 0) { in ReadBuildID()
[all …]
/system/core/trusty/line-coverage/
Dcoverage.cpp104 if (resp->hdr.cmd != (req->hdr.cmd | LINE_COVERAGE_CLIENT_CMD_RESP_BIT)) { in Rpc()
105 return ErrnoError() << "unknown response cmd: " << resp->hdr.cmd; in Rpc()
121 req.hdr.cmd = LINE_COVERAGE_CLIENT_CMD_OPEN; in Open()
144 req.hdr.cmd = LINE_COVERAGE_CLIENT_CMD_SHARE_RECORD; in Open()
153 req.hdr.cmd = LINE_COVERAGE_CLIENT_CMD_OPEN; in Open()
/system/chre/chpp/test/
Dpacket_util.cpp90 ChppTransportHeader &hdr = getHeader(pkt); in generateAck() local
91 return generateEmptyPacket(/*acqSeq=*/hdr.seq + 1, /*seq=*/hdr.ackSeq - 1); in generateAck()
145 void dumpHeader(std::ostream &os, const ChppTransportHeader &hdr) { in dumpHeader() argument
147 << " flags: 0x" << std::hex << (unsigned)hdr.flags; in dumpHeader()
148 if (hdr.flags & CHPP_TRANSPORT_FLAG_UNFINISHED_DATAGRAM) { in dumpHeader()
154 << " packetCode: 0x" << std::hex << (unsigned)hdr.packetCode in dumpHeader()
156 uint8_t attr = CHPP_TRANSPORT_GET_ATTR(hdr.packetCode); in dumpHeader()
177 uint8_t error = CHPP_TRANSPORT_GET_ERROR(hdr.packetCode); in dumpHeader()
210 << " ackSeq: " << std::dec << (unsigned)hdr.ackSeq << std::endl in dumpHeader()
211 << " seq: " << std::dec << (unsigned)hdr.seq << std::endl in dumpHeader()
[all …]
/system/nfc/src/nfa/dm/
Dnfa_dm_api.cc109 p_msg->hdr.event = NFA_DM_API_ENABLE_EVT; in NFA_Enable()
148 p_msg->hdr.event = NFA_DM_API_DISABLE_EVT; in NFA_Disable()
191 p_msg->hdr.event = NFA_DM_API_SET_POWER_SUB_STATE_EVT; in NFA_SetPowerSubStateForScreenState()
244 p_msg->hdr.event = NFA_DM_API_SET_CONFIG_EVT; in NFA_SetConfig()
281 p_msg->hdr.event = NFA_DM_API_GET_CONFIG_EVT; in NFA_GetConfig()
344 p_msg->hdr.event = NFA_DM_API_REQUEST_EXCL_RF_CTRL_EVT; in NFA_RequestExclusiveRfControl()
435 p_msg->hdr.event = NFA_DM_API_ENABLE_POLLING_EVT; in NFA_EnablePolling()
645 p_msg->hdr.event = NFA_DM_API_SET_RF_DISC_DURATION_EVT; in NFA_SetRfDiscoveryDuration()
695 p_msg->hdr.event = NFA_DM_API_SELECT_EVT; in NFA_Select()
730 p_msg->hdr.event = NFA_DM_API_UPDATE_RF_PARAMS_EVT; in NFA_UpdateRFCommParams()
[all …]
/system/nfc/src/nfa/ce/
Dnfa_ce_api.cc59 p_ce_msg->hdr.event = NFA_CE_API_DEREG_LISTEN_EVT; in nfa_ce_api_deregister_listen()
152 p_msg->local_tag.hdr.event = NFA_CE_API_CFG_LOCAL_TAG_EVT; in NFA_CeConfigureLocalTag()
213 p_msg->reg_listen.hdr.event = NFA_CE_API_REG_LISTEN_EVT; in NFA_CeConfigureUiccListenTech()
262 p_msg->reg_listen.hdr.event = NFA_CE_API_REG_LISTEN_EVT; in NFA_CeRegisterFelicaSystemCodeOnDH()
337 p_msg->reg_listen.hdr.event = NFA_CE_API_REG_LISTEN_EVT; in NFA_CeRegisterAidOnDH()
417 p_msg->hdr.event = NFA_CE_API_CFG_ISODEP_TECH_EVT; in NFA_CeSetIsoDepListenTech()
418 p_msg->hdr.layer_specific = tech_mask; in NFA_CeSetIsoDepListenTech()
/system/logging/logd/
DLogListener.cpp61 struct msghdr hdr = { in HandleData() local
65 ssize_t n = recvmsg(socket_, &hdr, 0); in HandleData()
77 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); in HandleData()
84 cmsg = CMSG_NXTHDR(&hdr, cmsg); in HandleData()
/system/netd/server/
DXfrmController.h300 nlattr hdr; member
308 nlattr hdr; member
316 nlattr hdr; member
324 nlattr hdr; member
332 nlattr hdr; member
339 nlattr hdr; member
346 nlattr hdr; member
353 nlattr hdr; member
360 nlattr hdr; member
367 nlattr hdr; member
[all …]
/system/nfc/src/fuzzers/nci/
Dhal.cc6 msg.hdr.len = 0; in hal_inject_event()
7 msg.hdr.event = BT_EVT_TO_NFC_MSGS; in hal_inject_event()
8 msg.hdr.offset = 0; in hal_inject_event()
9 msg.hdr.layer_specific = 0; in hal_inject_event()
/system/core/trusty/apploader/fuzz/
Dapp_fuzzer.cpp47 apploader_header hdr = { in SendLoadMsg() local
55 .iov_base = &hdr, in SendLoadMsg()
56 .iov_len = sizeof(hdr), in SendLoadMsg()
69 if (rc != static_cast<int>(sizeof(hdr) + sizeof(req))) { in SendLoadMsg()

123