Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 119) sorted by relevance

12345

/system/core/debuggerd/test/
DBacktraceMock.h56 virtual size_t Read(uintptr_t addr, uint8_t* buffer, size_t bytes) { in Read() argument
65 if (bytes > bytes_partial_read_) { in Read()
66 bytes = bytes_partial_read_; in Read()
68 bytes_partial_read_ -= bytes; in Read()
71 } else if (bytes > bytes_available) { in Read()
72 bytes = bytes_available; in Read()
75 if (bytes > 0) { in Read()
76 memcpy(buffer, buffer_.data() + offset, bytes); in Read()
80 return bytes; in Read()
83 void SetReadData(uint8_t* buffer, size_t bytes) { in SetReadData() argument
[all …]
/system/bt/service/common/bluetooth/binder/
Dparcel_helpers.cpp90 UUID::UUID128Bit bytes = uuid.GetFullBigEndian(); in WriteUUIDToParcel() local
93 ((((uint64_t) bytes[0]) << 56) | in WriteUUIDToParcel()
94 (((uint64_t) bytes[1]) << 48) | in WriteUUIDToParcel()
95 (((uint64_t) bytes[2]) << 40) | in WriteUUIDToParcel()
96 (((uint64_t) bytes[3]) << 32) | in WriteUUIDToParcel()
97 (((uint64_t) bytes[4]) << 24) | in WriteUUIDToParcel()
98 (((uint64_t) bytes[5]) << 16) | in WriteUUIDToParcel()
99 (((uint64_t) bytes[6]) << 8) | in WriteUUIDToParcel()
100 bytes[7]); in WriteUUIDToParcel()
103 ((((uint64_t) bytes[8]) << 56) | in WriteUUIDToParcel()
[all …]
/system/core/toolbox/upstream-netbsd/lib/libc/gen/
Dhumanize_number.c47 humanize_number(char *buf, size_t len, int64_t bytes, in humanize_number() argument
90 if (bytes < 0) { in humanize_number()
93 if (-bytes < INT64_MAX / 100) in humanize_number()
94 bytes *= -100; in humanize_number()
96 bytes = -bytes; in humanize_number()
103 if (bytes < INT64_MAX / 100) in humanize_number()
104 bytes *= 100; in humanize_number()
132 for (i = 0; bytes >= max - 50 && i < maxscale; i++) in humanize_number()
133 bytes /= divisor; in humanize_number()
141 bytes /= divisor; in humanize_number()
[all …]
/system/tpm/attestation/common/
Ddatabase.proto15 optional bytes endorsement_public_key = 1;
16 optional bytes endorsement_credential = 2;
17 optional bytes platform_credential = 3;
18 optional bytes conformance_credential = 4;
28 optional bytes identity_public_key = 1;
30 optional bytes identity_key_blob = 2;
32 optional bytes identity_credential = 3;
40 optional bytes identity_binding = 1;
42 optional bytes identity_public_key_der = 2;
44 optional bytes identity_public_key = 3;
[all …]
Dcommon.proto56 optional bytes quote = 1;
58 optional bytes quoted_data = 2;
60 optional bytes quoted_pcr_value = 3;
64 optional bytes pcr_source_hint = 4;
70 optional bytes wrapped_key = 2;
72 optional bytes iv = 3;
74 optional bytes mac = 4;
75 optional bytes encrypted_data = 5;
77 optional bytes wrapping_key_id = 6;
83 optional bytes data = 1;
[all …]
Dinterface.proto72 optional bytes public_key = 4;
74 optional bytes certify_info = 5;
76 optional bytes certify_info_signature = 6;
78 optional bytes certificate = 7;
88 optional bytes ek_public_key = 2;
90 optional bytes ek_certificate = 3;
100 optional bytes public_key = 2;
102 optional bytes public_key_tpm_format = 3;
104 optional bytes certificate = 4;
120 optional bytes certificate = 2;
[all …]
Dattestation_ca.proto33 optional bytes identity_public_key = 2;
65 optional bytes identity_credential = 1;
67 optional bytes certified_public_key = 3;
69 optional bytes certified_key_info = 4;
71 optional bytes certified_key_proof = 5;
73 optional bytes message_id = 10;
90 optional bytes certified_key_credential = 3;
92 optional bytes intermediate_ca_cert = 5;
94 optional bytes message_id = 6;
101 repeated bytes additional_intermediate_ca_cert = 7;
[all …]
/system/core/fastboot/
Dudp.cpp60 static uint16_t ExtractUint16(const uint8_t* bytes) { in ExtractUint16() argument
61 return (static_cast<uint16_t>(bytes[0]) << 8) | bytes[1]; in ExtractUint16()
71 const uint8_t* bytes() const { return bytes_; } in bytes() function in udp::Header
228 ssize_t bytes = SendSinglePacketHelper(&header, tx_data, packet_data_length, rx_data, in SendData() local
233 if (bytes == -1) { in SendData()
235 } else if (static_cast<size_t>(bytes) < rx_length) { in SendData()
236 rx_data += bytes; in SendData()
237 rx_length -= bytes; in SendData()
246 ret += bytes; in SendData()
260 if (!socket_->Send({{header->bytes(), kHeaderSize}, {tx_data, tx_length}})) { in SendSinglePacketHelper()
[all …]
/system/core/debuggerd/
Dutility.cpp136 size_t bytes = backtrace->Read(addr, reinterpret_cast<uint8_t*>(data), sizeof(data)); local
137 if (bytes % sizeof(uintptr_t) != 0) {
139 ALOGE("Bytes read %zu, is not a multiple of %zu", bytes, sizeof(uintptr_t));
140 bytes &= ~(sizeof(uintptr_t) - 1);
145 if (bytes == 0) {
156 if (bytes < MEMORY_BYTES_TO_DUMP && !skip_2nd_read) {
163 size_t bytes2 = backtrace->Read(addr + start + bytes, reinterpret_cast<uint8_t*>(data) + bytes,
164 sizeof(data) - bytes - start);
165 bytes += bytes2;
166 if (bytes2 > 0 && bytes % sizeof(uintptr_t) != 0) {
[all …]
/system/core/libutils/
DJenkinsHash.cpp37 uint32_t JenkinsHashMixBytes(uint32_t hash, const uint8_t* bytes, size_t size) { in JenkinsHashMixBytes() argument
44 uint32_t data = bytes[i] | (bytes[i+1] << 8) | (bytes[i+2] << 16) | (bytes[i+3] << 24); in JenkinsHashMixBytes()
48 uint32_t data = bytes[i]; in JenkinsHashMixBytes()
49 data |= ((size & 3) > 1) ? (bytes[i+1] << 8) : 0; in JenkinsHashMixBytes()
50 data |= ((size & 3) > 2) ? (bytes[i+2] << 16) : 0; in JenkinsHashMixBytes()
/system/bt/service/common/bluetooth/
Duuid.cpp42 UUID128Bit bytes; in GetRandom() local
43 base::RandBytes(bytes.data(), bytes.size()); in GetRandom()
44 return UUID(bytes); in GetRandom()
49 UUID128Bit bytes; in GetNil() local
50 bytes.fill(0); in GetNil()
51 return UUID(bytes); in GetNil()
56 UUID128Bit bytes; in GetMax() local
57 bytes.fill(1); in GetMax()
58 return UUID(bytes); in GetMax()
/system/core/libbacktrace/
DBacktracePtrace.cpp65 size_t BacktracePtrace::Read(uintptr_t addr, uint8_t* buffer, size_t bytes) { in Read() argument
76 bytes = MIN(map.end - addr, bytes); in Read()
84 size_t copy_bytes = MIN(sizeof(word_t) - align_bytes, bytes); in Read()
88 bytes -= copy_bytes; in Read()
92 size_t num_words = bytes / sizeof(word_t); in Read()
103 size_t left_over = bytes & (sizeof(word_t) - 1); in Read()
/system/netd/server/
DBandwidthController.h65 int setInterfaceSharedQuota(const char *iface, int64_t bytes);
66 int getInterfaceSharedQuota(int64_t *bytes);
69 int setInterfaceQuota(const char *iface, int64_t bytes);
70 int getInterfaceQuota(const char *iface, int64_t *bytes);
78 int setGlobalAlert(int64_t bytes);
83 int setSharedAlert(int64_t bytes);
86 int setInterfaceAlert(const char *iface, int64_t bytes);
139 int runIptablesAlertCmd(IptOp op, const char *alertName, int64_t bytes);
140 int runIptablesAlertFwdCmd(IptOp op, const char *alertName, int64_t bytes);
154 int updateQuota(const char *alertName, int64_t bytes);
[all …]
DBandwidthController.cpp743 int BandwidthController::getInterfaceSharedQuota(int64_t *bytes) { in getInterfaceSharedQuota() argument
744 return getInterfaceQuota("shared", bytes); in getInterfaceSharedQuota()
747 int BandwidthController::getInterfaceQuota(const char *costName, int64_t *bytes) { in getInterfaceQuota() argument
762 scanRes = fscanf(fp, "%" SCNd64, bytes); in getInterfaceQuota()
763 ALOGV("Read quota res=%d bytes=%" PRId64, scanRes, *bytes); in getInterfaceQuota()
801 int BandwidthController::updateQuota(const char *quotaName, int64_t bytes) { in updateQuota() argument
817 fprintf(fp, "%" PRId64"\n", bytes); in updateQuota()
822 int BandwidthController::runIptablesAlertCmd(IptOp op, const char *alertName, int64_t bytes) { in runIptablesAlertCmd() argument
844 bytes, alertName); in runIptablesAlertCmd()
848 bytes, alertName); in runIptablesAlertCmd()
[all …]
/system/tpm/trunks/
Dinterface.proto9 // The raw bytes of a TPM command.
10 optional bytes command = 1;
15 // The raw bytes of a TPM response.
16 optional bytes response = 1;
Dtrunks_ftdi_spi.cc84 size_t bytes, unsigned addr) { in StartTransaction() argument
93 header.body[0] = (read_write ? 0x80 : 0) | 0x40 | (bytes - 1); in StartTransaction()
123 bool TrunksFtdiSpi::FtdiWriteReg(unsigned reg_number, size_t bytes, in FtdiWriteReg() argument
128 StartTransaction(false, bytes, reg_number + locality_ * 0x10000); in FtdiWriteReg()
129 Write(mpsse_, buffer, bytes); in FtdiWriteReg()
134 bool TrunksFtdiSpi::FtdiReadReg(unsigned reg_number, size_t bytes, in FtdiReadReg() argument
141 StartTransaction(true, bytes, reg_number + locality_ * 0x10000); in FtdiReadReg()
142 value = Read(mpsse_, bytes); in FtdiReadReg()
144 memcpy(buffer, value, bytes); in FtdiReadReg()
/system/bt/btif/src/
Dbtif_uid.c78 void uid_set_add_tx(uid_set_t* set, int32_t app_uid, uint64_t bytes) { in uid_set_add_tx() argument
79 if (app_uid == -1 || bytes == 0) { in uid_set_add_tx()
85 node->data.tx_bytes += bytes; in uid_set_add_tx()
89 void uid_set_add_rx(uid_set_t* set, int32_t app_uid, uint64_t bytes) { in uid_set_add_rx() argument
90 if (app_uid == -1 || bytes == 0) { in uid_set_add_rx()
96 node->data.rx_bytes += bytes; in uid_set_add_rx()
/system/update_engine/payload_consumer/
Dfile_writer.h44 virtual bool Write(const void* bytes, size_t count) = 0;
50 virtual bool Write(const void* bytes, in Write() argument
54 return Write(bytes, count); in Write()
72 bool Write(const void* bytes, size_t count) override;
Dfake_extent_writer.h43 bool Write(const void* bytes, size_t count) override { in Write() argument
47 reinterpret_cast<const uint8_t*>(bytes), in Write()
48 reinterpret_cast<const uint8_t*>(bytes) + count); in Write()
/system/extras/verity/
Dverify_boot_signature.c228 ssize_t bytes = 0; in hash_image() local
254 bytes = BUFFER_SIZE; in hash_image()
257 bytes = length - total; in hash_image()
260 if ((bytes = read(fd, buffer, bytes)) == -1) { in hash_image()
265 EVP_DigestUpdate(ctx, buffer, bytes); in hash_image()
266 total += bytes; in hash_image()
269 if ((bytes = i2d_AuthAttrs((AuthAttrs *) aa, NULL)) < 0) { in hash_image()
274 if ((attrs = OPENSSL_malloc(bytes)) == NULL) { in hash_image()
286 EVP_DigestUpdate(ctx, attrs, bytes); in hash_image()
/system/connectivity/shill/shims/protos/
Dcrypto_util.proto36 optional bytes public_key = 1;
39 required bytes data = 2;
48 optional bytes encrypted_data = 2;
55 optional bytes certificate = 1;
59 optional bytes signed_data = 2;
63 optional bytes unsigned_data = 3;
66 optional bytes mac_address = 4;
/system/core/libziparchive/
Dzip_archive_stream_entry.cc86 size_t bytes = (length_ > data_.size()) ? data_.size() : length_; in Read() local
89 if (!android::base::ReadFully(archive->fd, data_.data(), bytes)) { in Read()
99 if (bytes < data_.size()) { in Read()
100 data_.resize(bytes); in Read()
103 length_ -= bytes; in Read()
206 size_t bytes = (compressed_length_ > in_.size()) ? in_.size() : compressed_length_; in Read() local
209 if (!android::base::ReadFully(archive->fd, in_.data(), bytes)) { in Read()
218 compressed_length_ -= bytes; in Read()
220 z_stream_.avail_in = bytes; in Read()
/system/update_engine/
Dfake_file_writer.h44 virtual ssize_t Write(const void* bytes, size_t count) { in Write() argument
47 const char* char_bytes = reinterpret_cast<const char*>(bytes); in Write()
59 const brillo::Blob& bytes() { in bytes() function
/system/core/libmemunreachable/
DLineBuffer.cpp47 ssize_t bytes = TEMP_FAILURE_RETRY(read(fd_, buffer_ + bytes_, buffer_len_ - bytes_ - 1)); in GetLine() local
48 if (bytes <= 0) { in GetLine()
60 bytes_ += bytes; in GetLine()
/system/extras/memory_replay/
DLineBuffer.cpp44 ssize_t bytes = TEMP_FAILURE_RETRY(read(fd_, buffer_ + bytes_, buffer_len_ - bytes_ - 1)); in GetLine() local
45 if (bytes <= 0) { in GetLine()
57 bytes_ += bytes; in GetLine()

12345