Searched defs:buf (Results 51 - 75 of 115) sorted by last modified time

12345

/system/core/libcutils/
H A Dtztime.c366 char buf[2 * sizeof(struct tzhead) + member in union:__anon403
370 int toread = sizeof u.buf;
407 char buf[READLEN]; local
416 while (read(fidix, buf, sizeof(buf)) == sizeof(buf)) {
417 memcpy(name, buf, NAMELEN);
421 off = toint((unsigned char *) buf + NAMELEN);
422 toread = toint((unsigned char *) buf + NAMELEN + INTLEN);
443 nread = read(fid, u.buf, torea
[all...]
H A Duio.c27 const char* buf = vecs->iov_base; local
31 int ret = read( fd, buf, len );
41 buf += ret;
54 const char* buf = (const char*)vecs->iov_base; local
58 int ret = write( fd, buf, len );
68 buf += ret;
/system/core/libion/
H A Dion_test.c110 char buf[CMSG_SPACE(sizeof(int))]; local
114 .msg_control = buf,
115 .msg_controllen = sizeof buf,
165 .msg_control = buf,
166 .msg_controllen = sizeof buf,
/system/core/liblinenoise/
H A Dlinenoise.c187 static void refreshLine(int fd, const char *prompt, char *buf, size_t len, size_t pos, size_t cols) { argument
192 buf++;
205 if (write(fd,buf,len) == -1) return;
214 static int linenoisePrompt(int fd, char *buf, size_t buflen, const char *prompt) { argument
221 buf[0] = '\0';
250 memmove(buf+pos-1,buf+pos,len-pos);
253 buf[len] = '\0';
254 refreshLine(fd,prompt,buf,len,pos,cols);
259 int aux = buf[po
364 linenoiseRaw(char *buf, size_t buflen, const char *prompt) argument
388 char buf[LINENOISE_MAX_LINE]; local
[all...]
/system/core/liblog/
H A Dlogd_write.c194 char buf[LOG_BUF_SIZE]; local
196 vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
198 return __android_log_write(prio, tag, buf);
204 char buf[LOG_BUF_SIZE]; local
207 vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
210 return __android_log_write(prio, tag, buf);
216 char buf[LOG_BUF_SIZE]; local
219 vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
222 return __android_log_buf_write(bufID, prio, tag, buf);
228 char buf[LOG_BUF_SIZ local
[all...]
H A Dlogprint.c345 * entry allocated by caller. Pointers will point directly into buf
350 int android_log_processLogBuffer(struct logger_entry *buf, argument
353 entry->tv_sec = buf->sec;
354 entry->tv_nsec = buf->nsec;
355 entry->pid = buf->pid;
356 entry->tid = buf->tid;
362 * starts at buf->msg+1
364 * starts at buf->msg+1+len(tag)+1
369 if (buf->len < 3) {
380 for (i = 1; i < buf
599 android_log_processBinaryLogBuffer(struct logger_entry *buf, AndroidLogEntry *entry, const EventTagMap* map, char* messageBuf, int messageBufLen) argument
[all...]
/system/core/libmincrypt/
H A Drsa_e_3.c166 uint8_t buf[RSANUMBYTES]; local
173 if (len != sizeof(buf)) {
182 buf[i] = signature[i];
185 modpow3(key, buf);
189 if (buf[i] != padding[i]) {
196 if (buf[i] != *sha++) {
H A Drsa_e_f4.c159 uint8_t buf[RSANUMBYTES]; local
166 if (len != sizeof(buf)) {
175 buf[i] = signature[i];
178 modpowF4(key, buf); // In-place exponentiation.
182 buf[i] ^= *sha++;
185 // Hash resulting buf, in-place.
186 SHA(buf, len, buf);
190 if (buf[i] != kExpectedPadShaRsa2048[i]) {
/system/core/libnetutils/
H A Ddhcpclient.c239 static void hex2str(char *buf, const unsigned char *array, int len) argument
242 char *cp = buf;
255 char buf[2048]; local
281 hex2str(buf, msg->chaddr, c);
282 ALOGD("chaddr = {%s}", buf);
320 if ((unsigned int)optsz < sizeof(buf) - 1) {
323 n = sizeof(buf) - 1;
325 memcpy(buf, &x[2], n);
326 buf[n] = '\0';
328 hex2str(buf,
[all...]
H A Difc_utils.c264 char buf[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + local
320 len = recv(s, buf, sizeof(buf), 0);
327 nh = (struct nlmsghdr *) buf;
/system/core/libnl_2/
H A Dnetlink.c51 /* Receives a netlink message, allocates a buffer in *buf and stores
54 * *buf if a positive value is returned. Interrupted system calls are
58 unsigned char **buf, struct ucred **creds)
68 *buf = (unsigned char *) malloc(RECV_BUF_SIZE);
69 if (!(*buf)) {
75 recvmsg_iov.iov_base = *buf;
95 free(*buf);
96 *buf = NULL;
113 unsigned char *buf; local
120 rc = nl_recv(sk, &nla, &buf,
57 nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla, \ unsigned char **buf, struct ucred **creds) argument
[all...]
/system/core/libpixelflinger/tinyutils/
H A DSharedBuffer.cpp54 SharedBuffer* buf = const_cast<SharedBuffer*>(this); local
55 if (buf->mSize == newSize) return buf;
56 buf = (SharedBuffer*)realloc(buf, sizeof(SharedBuffer) + newSize);
57 if (buf != NULL) {
58 buf->mSize = newSize;
59 return buf;
/system/core/libsparse/
H A Doutput_file.c97 char *buf; member in struct:output_file
119 int (*write)(void *priv, const void *buf, int len);
326 int read_all(int fd, void *buf, size_t len) argument
330 char *ptr = buf;
H A Dsparse_crc32.c101 uint32_t sparse_crc32(uint32_t crc_in, const void *buf, int size) argument
103 const uint8_t *p = buf;
H A Dsparse_read.c362 uint32_t *buf = malloc(s->block_size); local
371 if (!buf) {
377 ret = read_all(fd, buf, to_read);
386 if (buf[0] != buf[i]) {
396 /* TODO: add flag to use skip instead of fill for buf[0] == 0 */
397 sparse_file_add_fill(s, buf[0], to_read, block);
/system/core/libsuspend/
H A Dautosuspend_autosleep.c38 char buf[80]; local
45 strerror_r(errno, buf, sizeof(buf));
46 ALOGE("Error writing to %s: %s\n", SYS_POWER_AUTOSLEEP, buf);
60 char buf[80]; local
67 strerror_r(errno, buf, sizeof(buf));
68 ALOGE("Error writing to %s: %s\n", SYS_POWER_AUTOSLEEP, buf);
88 char buf[80]; local
92 strerror_r(errno, buf, sizeo
[all...]
H A Dautosuspend_earlysuspend.c51 char buf; local
55 err = read(fd, &buf, 1);
66 char buf; local
70 err = read(fd, &buf, 1);
80 char buf[80]; local
107 char buf[80]; local
114 strerror_r(errno, buf, sizeof(buf));
115 ALOGE("Error writing to %s: %s\n", EARLYSUSPEND_SYS_POWER_STATE, buf);
137 char buf[8 local
172 char buf[80]; local
200 char buf[80]; local
[all...]
H A Dautosuspend_wakeup_count.c43 char buf[80]; local
54 strerror_r(errno, buf, sizeof(buf));
55 ALOGE("Error reading from %s: %s\n", SYS_POWER_WAKEUP_COUNT, buf);
67 strerror_r(errno, buf, sizeof(buf));
68 ALOGE("Error waiting on semaphore: %s\n", buf);
75 strerror_r(errno, buf, sizeof(buf));
76 ALOGE("Error writing to %s: %s\n", SYS_POWER_WAKEUP_COUNT, buf);
98 char buf[80]; local
117 char buf[80]; local
142 char buf[80]; local
[all...]
/system/core/libsysutils/src/
H A DSocketClient.cpp58 char *buf; local
63 ret = asprintf(&buf, "%d %d %s (%s)", code, getCmdNum(), msg, strerror(errno));
65 ret = asprintf(&buf, "%d %s (%s)", code, msg, strerror(errno));
69 ret = asprintf(&buf, "%d %d %s", code, getCmdNum(), msg);
71 ret = asprintf(&buf, "%d %s", code, msg);
76 ret = sendMsg(buf);
77 free(buf);
86 char buf[8]; local
88 snprintf(buf, 4, "%.3d", code);
91 memcpy(buf
105 char buf[4]; local
[all...]
/system/core/libzipfile/
H A Dcentraldir.c22 read_le_int(const unsigned char* buf) argument
24 return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
28 read_le_short(const unsigned char* buf) argument
30 return buf[0] | (buf[1] << 8);
34 read_central_dir_values(Zipfile* file, const unsigned char* buf, int len) argument
43 file->disknum = read_le_short(&buf[
64 read_central_directory_entry(Zipfile* file, Zipentry* entry, const unsigned char** buf, ssize_t* len) argument
185 const unsigned char* buf = file->buf; local
[all...]
H A Dprivate.h23 const unsigned char *buf; member in struct:Zipfile
41 unsigned int read_le_int(const unsigned char* buf);
42 unsigned int read_le_short(const unsigned char* buf);
H A Dtest_zipfile.c13 void* buf; local
44 buf = malloc(size);
45 fread(buf, 1, size, f);
47 zip = init_zipfile(buf, size);
90 free(buf);
H A Dzipfile.c17 file->buf = data;
116 decompress_zipentry(zipentry_t e, void* buf, int bufsize) argument
122 memcpy(buf, entry->data, entry->uncompressedSize);
125 return uninflate(buf, bufsize, entry->data, entry->compressedSize);
/system/core/logcat/
H A Dlogcat.cpp37 unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1] __attribute__((aligned(4))); member in union:queued_entry_t::__anon469
150 void printBinary(struct logger_entry *buf) argument
152 size_t size = sizeof(logger_entry) + buf->len;
156 ret = write(g_outFD, buf, size);
160 static void processBuffer(log_device_t* dev, struct logger_entry *buf) argument
168 err = android_log_processBinaryLogBuffer(buf, &entry, g_eventTagMap,
173 err = android_log_processLogBuffer(buf, &entry);
223 char buf[1024]; local
224 snprintf(buf, sizeof(buf), "
515 char* buf = (char*) malloc(strlen(LOG_FILE_DIR) + strlen(optarg) + 1); local
[all...]
/system/core/sdcard/
H A Dsdcard.c206 * Populates 'buf' with the path and returns the length of the path on success,
209 static ssize_t get_node_path_locked(struct node* node, char* buf, size_t bufsize) argument
218 pathlen = get_node_path_locked(node->parent, buf, bufsize - namelen - 2);
222 buf[pathlen++] = '/';
226 memcpy(buf + pathlen, name, namelen + 1); /* include trailing \0 */
235 * Populates 'buf' with the path and returns the actual name (within 'buf') on success,
239 char* buf, size_t bufsize, int search)
250 memcpy(buf, path, pathlen);
251 buf[pathle
238 find_file_within(const char* path, const char* name, char* buf, size_t bufsize, int search) argument
386 lookup_node_and_path_by_id_locked(struct fuse* fuse, __u64 nid, char* buf, size_t bufsize) argument
[all...]

Completed in 85 milliseconds

12345