Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 227) sorted by relevance

12345678910

/device/google/contexthub/contexthubhal/
Dsystem_comms.cpp52 static void readAppName(MessageBuf &buf, hub_app_name_t &name) in readAppName() argument
54 name.id = buf.readU64(); in readAppName()
57 static void writeAppName(MessageBuf &buf, const hub_app_name_t &name) in writeAppName() argument
59 buf.writeU64(name.id); in writeAppName()
62 static void readNanohubMemInfo(MessageBuf &buf, NanohubMemInfo &mi) in readNanohubMemInfo() argument
83 while (buf.getRoom() >= 2) { in readNanohubMemInfo()
84 type = buf.readU8(); in readNanohubMemInfo()
85 len = buf.readU8(); in readNanohubMemInfo()
86 if (buf.getRoom() >= len) { in readNanohubMemInfo()
90 ramFree = buf.readU32(); in readNanohubMemInfo()
[all …]
/device/linaro/poplar/wifi/wpa_supplicant_8_lib/
Ddriver_cmd_wext.c72 char buf[WEXT_CSCAN_BUF_LEN]; in wpa_driver_wext_combo_scan() local
87 os_memcpy(buf, WEXT_CSCAN_HEADER, bp); in wpa_driver_wext_combo_scan()
89 if ((bp + IW_ESSID_MAX_SIZE + 10) >= (int)sizeof(buf)) in wpa_driver_wext_combo_scan()
92 buf[bp++] = WEXT_CSCAN_SSID_SECTION; in wpa_driver_wext_combo_scan()
93 buf[bp++] = params->ssids[i].ssid_len; in wpa_driver_wext_combo_scan()
94 os_memcpy(&buf[bp], params->ssids[i].ssid, params->ssids[i].ssid_len); in wpa_driver_wext_combo_scan()
99 buf[bp++] = WEXT_CSCAN_CHANNEL_SECTION; in wpa_driver_wext_combo_scan()
100 buf[bp++] = 0; in wpa_driver_wext_combo_scan()
103 buf[bp++] = WEXT_CSCAN_PASV_DWELL_SECTION; in wpa_driver_wext_combo_scan()
104 buf[bp++] = (u8)WEXT_CSCAN_PASV_DWELL_TIME; in wpa_driver_wext_combo_scan()
[all …]
Ddriver_cmd_nl80211.c60 int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf, in wpa_driver_nl80211_driver_cmd() argument
97 ret = os_snprintf(buf, buf_len, in wpa_driver_nl80211_driver_cmd()
100 os_memcpy(buf, cmd, strlen(cmd) + 1); in wpa_driver_nl80211_driver_cmd()
104 priv_cmd.bufaddr = buf; in wpa_driver_nl80211_driver_cmd()
119 ret = strlen(buf); in wpa_driver_nl80211_driver_cmd()
121 wpa_printf(MSG_DEBUG, "%s %s len = %d, %zu", __func__, buf, ret, strlen(buf)); in wpa_driver_nl80211_driver_cmd()
129 char buf[MAX_DRV_CMD_SIZE]; in wpa_driver_set_p2p_noa() local
131 memset(buf, 0, sizeof(buf)); in wpa_driver_set_p2p_noa()
133 snprintf(buf, sizeof(buf), "P2P_SET_NOA %d %d %d", count, start, duration); in wpa_driver_set_p2p_noa()
134 return wpa_driver_nl80211_driver_cmd(priv, buf, buf, strlen(buf)+1); in wpa_driver_set_p2p_noa()
[all …]
/device/google/cuttlefish/common/libs/fs/
Dshared_buf.cc33 ssize_t WriteAll(SharedFD fd, const char* buf, size_t size) { in WriteAll() argument
36 while ((written = fd->Write((void*)&(buf[total_written]), size - total_written)) > 0) { in WriteAll()
49 ssize_t ReadExact(SharedFD fd, char* buf, size_t size) { in ReadExact() argument
52 while ((read = fd->Read((void*)&(buf[total_read]), size - total_read)) > 0) { in ReadExact()
65 ssize_t ReadAll(SharedFD fd, std::string* buf) { in ReadAll() argument
77 *buf = ss.str(); in ReadAll()
78 return buf->size(); in ReadAll()
81 ssize_t ReadExact(SharedFD fd, std::string* buf) { in ReadExact() argument
82 return ReadExact(fd, buf->data(), buf->size()); in ReadExact()
85 ssize_t ReadExact(SharedFD fd, std::vector<char>* buf) { in ReadExact() argument
[all …]
Dshared_buf.h33 ssize_t ReadAll(SharedFD fd, std::string* buf);
43 ssize_t ReadExact(SharedFD fd, std::string* buf);
53 ssize_t ReadExact(SharedFD fd, std::vector<char>* buf);
63 ssize_t ReadExact(SharedFD fd, char* buf, size_t size);
86 ssize_t WriteAll(SharedFD fd, const std::string& buf);
96 ssize_t WriteAll(SharedFD fd, const std::vector<char>& buf);
106 ssize_t WriteAll(SharedFD fd, const char* buf, size_t size);
/device/generic/goldfish-opengl/system/GLESv1_enc/
Dgl_enc.cpp31 unsigned char *buf; in glAlphaFunc_enc() local
35 buf = stream->alloc(totalSize); in glAlphaFunc_enc()
36 ptr = buf; in glAlphaFunc_enc()
43 if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf); in glAlphaFunc_enc()
57 unsigned char *buf; in glClearColor_enc() local
61 buf = stream->alloc(totalSize); in glClearColor_enc()
62 ptr = buf; in glClearColor_enc()
71 if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf); in glClearColor_enc()
85 unsigned char *buf; in glClearDepthf_enc() local
89 buf = stream->alloc(totalSize); in glClearDepthf_enc()
[all …]
/device/generic/goldfish-opengl/system/GLESv2_enc/
Dgl2_enc.cpp31 unsigned char *buf; in glActiveTexture_enc() local
35 buf = stream->alloc(totalSize); in glActiveTexture_enc()
36 ptr = buf; in glActiveTexture_enc()
42 if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf); in glActiveTexture_enc()
56 unsigned char *buf; in glAttachShader_enc() local
60 buf = stream->alloc(totalSize); in glAttachShader_enc()
61 ptr = buf; in glAttachShader_enc()
68 if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf); in glAttachShader_enc()
83 unsigned char *buf; in glBindAttribLocation_enc() local
87 buf = stream->alloc(totalSize); in glBindAttribLocation_enc()
[all …]
/device/generic/goldfish-opengl/system/renderControl_enc/
DrenderControl_enc.cpp31 unsigned char *buf; in rcGetRendererVersion_enc() local
35 buf = stream->alloc(totalSize); in rcGetRendererVersion_enc()
36 ptr = buf; in rcGetRendererVersion_enc()
41 if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf); in rcGetRendererVersion_enc()
72 unsigned char *buf; in rcGetEGLVersion_enc() local
76 buf = stream->alloc(totalSize); in rcGetEGLVersion_enc()
77 ptr = buf; in rcGetEGLVersion_enc()
84 if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf); in rcGetEGLVersion_enc()
118 unsigned char *buf; in rcQueryEGLString_enc() local
122 buf = stream->alloc(totalSize); in rcQueryEGLString_enc()
[all …]
/device/linaro/dragonboard/qcom/tqftpserv/
Dtqftpserv.c79 char *buf; in tftp_send_data() local
82 buf = malloc(4 + client->blksize); in tftp_send_data()
83 p = buf; in tftp_send_data()
95 free(buf); in tftp_send_data()
102 len = send(client->sock, buf, p - buf, 0); in tftp_send_data()
104 free(buf); in tftp_send_data()
123 char buf[512]; in tftp_send_oack() local
124 char *p = buf; in tftp_send_oack()
175 return send(sock, buf, p - buf, 0); in tftp_send_oack()
181 char *buf; in tftp_send_error() local
[all …]
/device/generic/opengl-transport/host/commands/emugen/tests/t.001/expected/encoder/
Dfoo_enc.cpp31 unsigned char *buf; in fooAlphaFunc_enc() local
35 buf = stream->alloc(totalSize); in fooAlphaFunc_enc()
36 ptr = buf; in fooAlphaFunc_enc()
43 if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf); in fooAlphaFunc_enc()
58 unsigned char *buf; in fooIsBuffer_enc() local
62 buf = stream->alloc(totalSize); in fooIsBuffer_enc()
63 ptr = buf; in fooIsBuffer_enc()
70 if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf); in fooIsBuffer_enc()
99 unsigned char *buf; in fooDoEncoderFlush_enc() local
103 buf = stream->alloc(totalSize); in fooDoEncoderFlush_enc()
[all …]
/device/google/coral/json-c/
Dprintbuf.c41 if(!(p->buf = (char*)malloc(p->size))) { in printbuf_new()
73 if(!(t = (char*)realloc(p->buf, new_size))) in printbuf_extend()
76 p->buf = t; in printbuf_extend()
80 int printbuf_memappend(struct printbuf *p, const char *buf, int size) in printbuf_memappend() argument
86 memcpy(p->buf + p->bpos, buf, size); in printbuf_memappend()
88 p->buf[p->bpos]= '\0'; in printbuf_memappend()
105 memset(pb->buf + offset, charvalue, len); in printbuf_memset()
120 static int vasprintf(char **buf, const char *fmt, va_list ap) in vasprintf() argument
128 if(!buf) { return -1; } in vasprintf()
146 *buf = b; in vasprintf()
[all …]
Djson_util.c71 char buf[JSON_FILE_BUF_SIZE]; in json_object_from_file() local
84 while((ret = read(fd, buf, JSON_FILE_BUF_SIZE)) > 0) { in json_object_from_file()
85 printbuf_memappend(pb, buf, ret); in json_object_from_file()
94 obj = json_tokener_parse(pb->buf); in json_object_from_file()
148 int json_parse_double(const char *buf, double *retval) in json_parse_double() argument
150 return (sscanf(buf, "%lf", retval)==1 ? 0 : 1); in json_parse_double()
179 int json_parse_int64(const char *buf, int64_t *retval) in json_parse_int64() argument
193 while (isspace((int)*buf) && *buf) in json_parse_int64()
194 buf++; in json_parse_int64()
197 if (sscanf(buf, "%" SCNd64, &num64) != 1) in json_parse_int64()
[all …]
/device/google/crosshatch/json-c/
Dprintbuf.c41 if(!(p->buf = (char*)malloc(p->size))) { in printbuf_new()
73 if(!(t = (char*)realloc(p->buf, new_size))) in printbuf_extend()
76 p->buf = t; in printbuf_extend()
80 int printbuf_memappend(struct printbuf *p, const char *buf, int size) in printbuf_memappend() argument
86 memcpy(p->buf + p->bpos, buf, size); in printbuf_memappend()
88 p->buf[p->bpos]= '\0'; in printbuf_memappend()
105 memset(pb->buf + offset, charvalue, len); in printbuf_memset()
120 static int vasprintf(char **buf, const char *fmt, va_list ap) in vasprintf() argument
128 if(!buf) { return -1; } in vasprintf()
146 *buf = b; in vasprintf()
[all …]
/device/google/bonito/json-c/
Dprintbuf.c41 if(!(p->buf = (char*)malloc(p->size))) { in printbuf_new()
73 if(!(t = (char*)realloc(p->buf, new_size))) in printbuf_extend()
76 p->buf = t; in printbuf_extend()
80 int printbuf_memappend(struct printbuf *p, const char *buf, int size) in printbuf_memappend() argument
86 memcpy(p->buf + p->bpos, buf, size); in printbuf_memappend()
88 p->buf[p->bpos]= '\0'; in printbuf_memappend()
105 memset(pb->buf + offset, charvalue, len); in printbuf_memset()
120 static int vasprintf(char **buf, const char *fmt, va_list ap) in vasprintf() argument
128 if(!buf) { return -1; } in vasprintf()
146 *buf = b; in vasprintf()
[all …]
/device/linaro/hikey/power/
Dpower_hikey.c108 char buf[80]; in sysfs_write() local
113 strerror_r(errno, buf, sizeof(buf)); in sysfs_write()
114 ALOGE("Error opening %s: %s\n", path, buf); in sysfs_write()
120 strerror_r(errno, buf, sizeof(buf)); in sysfs_write()
121 ALOGE("Error writing to %s: %s\n", path, buf); in sysfs_write()
190 char buf[80]; in interactive_boostpulse() local
198 strerror_r(errno, buf, sizeof(buf)); in interactive_boostpulse()
200 buf); in interactive_boostpulse()
208 strerror_r(errno, buf, sizeof(buf)); in interactive_boostpulse()
210 INTERACTIVE_BOOSTPULSE_PATH, buf); in interactive_boostpulse()
[all …]
/device/google/cuttlefish/host/commands/secure_env/
Dhmac_serializable.cpp40 uint8_t* HmacSerializable::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize() argument
42 buf = keymaster::append_uint32_to_buf(buf, end, wrapped_size); in Serialize()
43 auto signed_data = buf; in Serialize()
44 buf = wrapped_->Serialize(buf, end); in Serialize()
45 if (buf - signed_data != wrapped_size) { in Serialize()
47 return buf; in Serialize()
52 return buf; in Serialize()
63 return buf; in Serialize()
68 return buf; in Serialize()
71 buf, end, hmac_data->buffer, digest_size_); in Serialize()
/device/generic/goldfish-opengl/shared/OpenglCodecCommon/
DSocketStream.cpp113 const unsigned char *SocketStream::readFully(void *buf, size_t len) in readFully() argument
116 if (!buf) { in readFully()
121 ssize_t stat = ::recv(m_sock, (char *)(buf) + len - res, res, 0); in readFully()
130 return (const unsigned char *)buf; in readFully()
133 const unsigned char *SocketStream::commitBufferAndReadFully(size_t size, void *buf, size_t len) in commitBufferAndReadFully() argument
135 return commitBuffer(size) ? NULL : readFully(buf, len); in commitBufferAndReadFully()
138 const unsigned char *SocketStream::read( void *buf, size_t *inout_len) in read() argument
141 if (!buf) { in read()
147 n = recv(buf, *inout_len); in read()
152 return (const unsigned char *)buf; in read()
[all …]
/device/linaro/dragonboard/qcom/rmtfs/
Dqmi_tlv.c19 void *buf; member
40 tlv->buf = tlv->allocated; in qmi_tlv_init()
42 pkt = tlv->buf; in qmi_tlv_init()
51 struct qmi_tlv *qmi_tlv_decode(void *buf, size_t len, unsigned *txn, unsigned msg_type) in qmi_tlv_decode() argument
53 struct qmi_packet *pkt = buf; in qmi_tlv_decode()
62 tlv->buf = buf; in qmi_tlv_decode()
79 pkt = tlv->buf; in qmi_tlv_encode()
83 return tlv->buf; in qmi_tlv_encode()
99 pkt = tlv->buf; in qmi_tlv_get_item()
169 memcpy(newp, tlv->buf, tlv->size); in qmi_tlv_alloc_item()
[all …]
/device/linaro/hikey/hifi/xaf/hifi-dpf/include/sys/xt-shmem/
Dxf-sys.h54 #define XF_PROXY_INVALIDATE(buf, length) \ argument
55 ({ if ((length)) { xthal_dcache_region_invalidate((buf), (length)); barrier(); } buf; })
58 #define XF_PROXY_FLUSH(buf, length) \ argument
59 …((length)) { barrier(); xthal_dcache_region_writeback((buf), (length)); XF_PROXY_BARRIER(); } buf;…
/device/generic/goldfish/MultiDisplayProvider/jni/
Dcom_android_emulator_multidisplay.cpp48 static void fillMsg(std::vector<uint8_t>& buf, uint8_t cmd, uint8_t* data, uint32_t size) { in fillMsg() argument
52 buf.insert(buf.end(), p, p + 4); in fillMsg()
53 buf.push_back(cmd); in fillMsg()
55 buf.insert(buf.end(), data, data + size); in fillMsg()
74 std::vector<uint8_t> buf; in onFrameAvailable() local
75 fillMsg(buf, BIND, (uint8_t*)data, sizeof(data)); in onFrameAvailable()
76 qemu_pipe_write_fully(gFd, buf.data(), buf.size()); in onFrameAvailable()
114 std::vector<uint8_t> buf; in nativeOpen() local
115 fillMsg(buf, QUERY, nullptr, 0); in nativeOpen()
116 qemu_pipe_write_fully(gFd, buf.data(), buf.size()); in nativeOpen()
/device/linaro/hikey/hifi/xaf/hifi-dpf/core/util/
Dtinyvprintf.c64 char c, space = ' ', buf[11]; /* largest 32-bit integer output (octal) */ in tiny_vsprintf() local
73 char *s = buf, *t, pad = ' ', sign = 0; in tiny_vsprintf()
77 case 'c': buf[0] = va_arg(ap, int); goto donefmt; in tiny_vsprintf()
131 len = s - buf; in tiny_vsprintf()
132 s = buf; in tiny_vsprintf()
142 s = buf + 11; in tiny_vsprintf()
147 len = buf + 11 - s; in tiny_vsprintf()
156 s = buf + 8; in tiny_vsprintf()
161 len = buf + 8 - s; in tiny_vsprintf()
169 buf[0] = c; /* handles case of '%' */ in tiny_vsprintf()
/device/google/contexthub/util/nanoapp_sign/
Dnanoapp_sign.c47 static int getHexEncodedByte(uint8_t *buf, uint32_t *ppos, uint32_t size) in getHexEncodedByte() argument
59 c = buf[pos++]; in getHexEncodedByte()
194 uint8_t *buf = *pbuf; in handleConvertKey() local
203 c = getHexEncodedByte(buf, &pos, bufUsed); in handleConvertKey()
211 buf[i] = c; in handleConvertKey()
215 uint32_t *be32Buf = (uint32_t*)buf; in handleConvertKey()
229 uint8_t *buf = *pbuf; in handleVerify() local
234 struct ImageHeader *image = (struct ImageHeader *)buf; in handleVerify()
262 sha2processBytes(&shaState, buf, bufUsed - sigData); in handleVerify()
264 sigPack = buf + bufUsed - sigData; in handleVerify()
[all …]
/device/generic/goldfish/sensors/
Dmultihal_sensors_qemu.cpp87 char buf[256]; in parseQemuSensorEvent() local
88 const int len = qemud_channel_recv(pipe, buf, sizeof(buf) - 1); in parseQemuSensorEvent()
93 buf[len] = 0; in parseQemuSensorEvent()
94 const char* end = buf + len; in parseQemuSensorEvent()
102 if (const char* values = testPrefix(buf, end, "acceleration", ':')) { in parseQemuSensorEvent()
112 } else if (const char* values = testPrefix(buf, end, "gyroscope", ':')) { in parseQemuSensorEvent()
122 } else if (const char* values = testPrefix(buf, end, "gyroscope-uncalibrated", ':')) { in parseQemuSensorEvent()
134 } else if (const char* values = testPrefix(buf, end, "orientation", ':')) { in parseQemuSensorEvent()
144 } else if (const char* values = testPrefix(buf, end, "magnetic", ':')) { in parseQemuSensorEvent()
154 } else if (const char* values = testPrefix(buf, end, "magnetic-uncalibrated", ':')) { in parseQemuSensorEvent()
[all …]
/device/generic/goldfish-opengl/shared/qemupipe/
Dqemu_pipe_guest.cpp52 char buf[256]; in qemu_pipe_open_ns() local
55 bufLen = snprintf(buf, sizeof(buf), "pipe:%s:%s", ns, pipeName); in qemu_pipe_open_ns()
57 bufLen = snprintf(buf, sizeof(buf), "pipe:%s", pipeName); in qemu_pipe_open_ns()
60 if (qemu_pipe_write_fully(fd, buf, bufLen + 1)) { in qemu_pipe_open_ns()
62 __func__, __LINE__, buf, strerror(errno)); in qemu_pipe_open_ns()
/device/generic/opengl-transport/host/libs/virglrenderer/
DChecksumCalculatorThreadInfo.h27 static bool writeChecksum(ChecksumCalculator* calc, void* buf, size_t bufLen, in writeChecksum() argument
29 calc->addBuffer(buf, bufLen); in writeChecksum()
33 static bool validate(ChecksumCalculator* calc, void* buf, size_t bufLen, void* checksum, in validate() argument
35 calc->addBuffer(buf, bufLen); in validate()
39 static void validOrDie(ChecksumCalculator* calc, void* buf, size_t bufLen, void* checksum, in validOrDie() argument
41 if (!validate(calc, buf, bufLen, checksum, checksumLen)) { in validOrDie()

12345678910