Searched defs:buf (Results 76 - 100 of 102) sorted by relevance

12345

/system/core/nexus/
H A DSupplicant.cpp448 char buf[2048]; local
472 while ((nread = read(srcfd, buf, sizeof(buf))) != 0) {
480 write(destfd, buf, nread);
/system/extras/ext4_utils/
H A Dext4_utils.c324 u8 *buf = calloc(info.block_size, 1); local
325 memcpy(buf + 1024, (u8*)aux_info.sb, 1024);
326 queue_data_block(buf, info.block_size, 0);
476 struct stat buf; local
481 ret = stat(filename, &buf);
488 if (S_ISREG(buf.st_mode))
489 computed_size = buf.st_size - reserve_len;
490 else if (S_ISBLK(buf.st_mode))
/system/bluetooth/brcm_patchram_plus/
H A Dbrcm_patchram_plus.c597 hci_send_cmd(uchar *buf, int len) argument
601 dump(buf, len);
604 write(uart_fd, buf, len);
/system/bluetooth/tools/
H A Dasocket_test.c188 char buf; local
191 ret = read(fd, &buf, 1);
192 printf("%d: read(%d) = %d [%d]\n", gettid(), fd, ret, (int)buf);
276 char buf = 69; local
279 ret = write(fd, &buf, 1);
H A Dsocktest.c187 char buf; local
190 ret = read(fd, &buf, 1);
191 printf("%ld: read(%d) = %d [%d]\n", pthread_self(), fd, ret, (int)buf);
290 char buf = 69; local
293 ret = write(fd, &buf, 1);
/system/core/adb/
H A Dfile_sync_client.c80 char buf[257]; local
102 if(readx(fd, buf, len)) break;
103 buf[len] = 0;
108 buf, cookie); local
H A Dsysdeps.h114 extern int adb_read(int fd, void* buf, int len);
115 extern int adb_write(int fd, const void* buf, int len);
127 static __inline__ int unix_read(int fd, void* buf, size_t len) argument
129 return read(fd, buf, len);
134 static __inline__ int unix_write(int fd, const void* buf, size_t len) argument
136 return write(fd, buf, len);
354 static __inline__ int adb_read(int fd, void* buf, size_t len) argument
356 return read(fd, buf, len);
362 static __inline__ int adb_write(int fd, const void* buf, size_t len) argument
364 return write(fd, buf, le
[all...]
H A Dtransport.c839 int list_transports(char *buf, size_t bufsize) argument
841 char* p = buf;
842 char* end = buf + bufsize;
862 return p - buf;
H A Dadb.c1088 char buf[4096]; local
1132 memset(buf, 0, sizeof(buf));
1136 snprintf(buf, sizeof(buf), "OKAY%04x%s",(unsigned)strlen(buffer),buffer);
1138 writex(reply_fd, buf, strlen(buf));
1152 snprintf(buf, sizeof(buf), "OKAY%04x%s",(unsigned)strlen(buffer), buffer);
1153 writex(reply_fd, buf, strle
[all...]
H A Dcommandline.c225 char buf[4096]; local
230 len = adb_read(fd, buf, 4096);
240 fwrite(buf, 1, len, stdout);
247 char* buf = (char*) malloc(BUFSIZE); local
253 len = adb_read(inFd, buf, BUFSIZE);
266 adb_write(outFd, buf, len);
270 free(buf);
276 unsigned char buf[1024]; local
288 r = unix_read(fdi, buf, 1024);
296 switch(buf[
527 send_shellcommand(transport_type transport, char* serial, char* buf) argument
550 char buf[4096]; local
600 char buf[4096]; local
824 char buf[4096]; local
1349 char buf[4096]; local
1387 char buf[4096]; local
[all...]
/system/core/init/
H A Ddevices.c117 char buf[512]; local
134 if ((strlen(upath) + strlen(dp->attr) + 6) > sizeof(buf))
137 sprintf(buf,"/sys%s/%s", upath, dp->attr);
138 INFO("fixup %s %d %d 0%o\n", buf, dp->uid, dp->gid, dp->perm);
139 chown(buf, dp->uid, dp->gid);
140 chmod(buf, dp->perm);
383 char buf[256]; local
611 char buf[PAGE_SIZE]; local
614 nr = read(fw_fd, buf, sizeof(buf));
[all...]
/system/core/liblog/
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/logcat/
H A Dlogcat.cpp37 unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1] __attribute__((aligned(4))); member in union:queued_entry_t::__anon429
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.c129 * buf: storage for returned string
132 char *do_node_get_path(struct node *node, char *buf, const char *name, int match_case_insensitive) argument
136 char *out = buf + PATH_BUFFER_SIZE - 1;
150 if ((len + 1) > (out - buf))
179 memcpy(buf + PATH_BUFFER_SIZE - len - 1, entry->d_name, len);
189 char *node_get_path(struct node *node, char *buf, const char *name) argument
192 return do_node_get_path(node, buf, name, CASE_SENSITIVE_MATCH);
/system/core/toolbox/
H A Ddd.c604 bwrite(int fd, const void *buf, size_t len) argument
611 rv = write(fd, buf, len);
996 char buf[100]; local
1008 (void)snprintf(buf, sizeof(buf),
1012 (void)write(STDERR_FILENO, buf, strlen(buf));
1014 (void)snprintf(buf, sizeof(buf), "%llu odd length swab %s\n",
1017 (void)write(STDERR_FILENO, buf, strle
[all...]
H A Dpowerd.c81 char buf[40]; local
87 read_len = read(fd, buf, sizeof(buf));
89 //printf("charging_state_notify_handler: \"%s\"\n", buf);
90 state = !(strncmp(buf, "Unknown", 7) == 0
91 || strncmp(buf, "Discharging", 11) == 0);
359 char buf[32]; local
361 len = sprintf(buf, "%ld%06lu000", event.time.tv_sec, event.time.tv_usec);
362 write(user_activity_fd, buf, len);
427 char buf[3 local
[all...]
H A Dtop.c325 char buf[MAX_LINE], *open_paren, *close_paren; local
330 fgets(buf, MAX_LINE, file);
334 open_paren = strchr(buf, '(');
335 close_paren = strrchr(buf, ')');
H A Dnewfs_msdos.c257 char buf[MAXPATHLEN]; local
368 snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname);
369 if (!(fname = strdup(buf)))
500 snprintf(buf, sizeof(buf), "/boot/%s", bname);
501 if (!(bname = strdup(buf)))
679 sprintf(buf, "FAT%u", fat);
680 setstr(bsx->type, buf, sizeof(bsx->type));
/system/core/charger/
H A Dcharger.c201 char *buf; local
209 buf = load_file(LAST_KMSG_PATH, &sz);
210 if (!buf || !sz) {
216 ptr = buf + (sz - len);
236 free(buf);
244 static int read_file(const char *path, char *buf, size_t sz) argument
253 cnt = read(fd, buf, sz - 1);
256 buf[cnt] = '\0';
257 if (buf[cnt - 1] == '\n') {
259 buf[cn
273 char buf[32]; local
[all...]
/system/core/debuggerd/
H A Ddebuggerd.c52 char buf[512]; local
59 vsnprintf(buf, sizeof(buf), fmt, ap);
60 len = strlen(buf);
61 if(tfd >= 0) write(tfd, buf, len);
451 unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1]; member in union:__anon290
456 ssize_t actual = read(logfd, log_entry.buf, LOGGER_ENTRY_MAX_LEN);
719 char buf[64]; local
757 snprintf(buf, sizeof buf, "/pro
[all...]
/system/core/libnetutils/
H A Difc_utils.c265 char buf[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + local
321 len = recv(s, buf, sizeof(buf), 0);
328 nh = (struct nlmsghdr *) buf;
/system/core/sh/
H A Dexpand.c413 char buf[128]; local
438 p = in.buf;
444 while ((i = read(in.fd, buf, sizeof buf)) < 0 && errno == EINTR);
448 p = buf;
466 if (in.buf)
467 ckfree(in.buf);
1518 cvtnum(int num, char *buf) argument
1534 STPUTC(*p++, buf);
1535 return buf;
[all...]
H A Darith_lex.c522 #define YY_INPUT(buf,result,max) \
523 result = (*buf = *arith_buf++) ? 1 : YY_NULL;
586 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
590 #define YY_INPUT(buf,result,max_size) \
597 buf[n] = (char) c; \
599 buf[n++] = (char) c; \
607 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1668 char *buf; local
1674 buf = (char *) yyalloc(n );
1675 if ( ! buf )
[all...]
/system/vold/
H A Dcryptfs.c1043 char *buf[CRYPT_INPLACE_BUFSIZE]; local
1078 char buf[8]; local
1081 snprintf(buf, sizeof(buf), "%lld", cur_pct);
1082 property_set("vold.encrypt_progress", buf);
1084 if (unix_read(realfd, buf, CRYPT_INPLACE_BUFSIZE) <= 0) {
1088 if (unix_write(cryptofd, buf, CRYPT_INPLACE_BUFSIZE) <= 0) {
1096 if (unix_read(realfd, buf, 512) <= 0) {
1100 if (unix_write(cryptofd, buf, 512) <= 0) {
/system/core/libcutils/
H A Dtztime.c366 char buf[2 * sizeof(struct tzhead) + member in union:__anon380
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...]

Completed in 1948 milliseconds

12345