Searched defs:buf (Results 101 - 115 of 115) sorted by relevance

12345

/system/core/adb/
H A Dadb.c285 static size_t fill_connect_data(char *buf, size_t bufsize) argument
288 return snprintf(buf, bufsize, "host::") + 1;
300 len = snprintf(buf, remaining, "%s::", adb_device_banner);
302 buf += len;
306 len = snprintf(buf, remaining, "%s=%s;", cnxn_props[i], value);
308 buf += len;
1338 char buf[4096]; local
1384 memset(buf, 0, sizeof(buf));
1388 snprintf(buf, sizeo
[all...]
H A Dcommandline.c229 char buf[4096]; local
234 len = adb_read(fd, buf, 4096);
244 fwrite(buf, 1, len, stdout);
251 char* buf = (char*) malloc(BUFSIZE); local
257 len = adb_read(inFd, buf, BUFSIZE);
270 adb_write(outFd, buf, len);
274 free(buf);
280 unsigned char buf[1024]; local
292 r = unix_read(fdi, buf, 1024);
300 switch(buf[
377 char buf[4096]; local
608 send_shellcommand(transport_type transport, char* serial, char* buf) argument
631 char buf[4096]; local
685 char buf[4096]; local
911 char buf[4096]; local
1455 char buf[4096]; local
1493 char buf[4096]; local
[all...]
H A Dtransport.c895 static void add_qual(char **buf, size_t *buf_size, argument
901 if (!buf || !*buf || !buf_size || !*buf_size || !qual || !*qual)
904 len = snprintf(*buf, *buf_size, "%s%n%s", prefix, &prefix_len, qual);
908 for (cp = *buf + prefix_len; cp < *buf + len; cp++) {
915 *buf += len;
918 static size_t format_transport(atransport *t, char *buf, size_t bufsize, argument
926 return snprintf(buf, bufsize, "%s\t%s\n", serial, statename(t));
930 len = snprintf(buf, remainin
946 list_transports(char *buf, size_t bufsize, int long_listing) argument
[all...]
H A Dsysdeps_win32.c84 int (*_fh_read) ( FH f, void* buf, int len );
85 int (*_fh_write)( FH f, const void* buf, int len );
228 _fh_file_read( FH f, void* buf, int len ) argument
232 if ( !ReadFile( f->fh_handle, buf, (DWORD)len, &read_bytes, NULL ) ) {
243 _fh_file_write( FH f, const void* buf, int len ) argument
247 if ( !WriteFile( f->fh_handle, buf, (DWORD)len, &wrote_bytes, NULL ) ) {
402 int adb_read(int fd, void* buf, int len) argument
410 return f->clazz->_fh_read( f, buf, len );
414 int adb_write(int fd, const void* buf, int len) argument
422 return f->clazz->_fh_write(f, buf, le
514 _fh_socket_read( FH f, void* buf, int len ) argument
525 _fh_socket_write( FH f, const void* buf, int len ) argument
1142 _fh_socketpair_read( FH f, void* buf, int len ) argument
1159 _fh_socketpair_write( FH f, const void* buf, int len ) argument
[all...]
/system/core/charger/
H A Dcharger.c202 char *buf; local
210 buf = load_file(LAST_KMSG_PATH, &sz);
211 if (!buf || !sz) {
217 ptr = buf + (sz - len);
237 free(buf);
245 static int read_file(const char *path, char *buf, size_t sz) argument
254 cnt = read(fd, buf, sz - 1);
257 buf[cnt] = '\0';
258 if (buf[cnt - 1] == '\n') {
260 buf[cn
274 char buf[32]; local
[all...]
/system/core/init/
H A Dinit.c828 int audit_callback(void *data, security_class_t cls, char *buf, size_t len) argument
830 snprintf(buf, len, "property=%s", !data ? "NULL" : (char *)data);
/system/core/libnetutils/
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/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;
/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...]
/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...]
H A Dinit.c918 char *buf; /* input buffer */ member in struct:parsefile
960 basepf.nextc = basepf.buf = basebuf;
1016 if (memout.buf != NULL) {
1017 ckfree(memout.buf);
1018 memout.buf = NULL;
/system/core/toolbox/
H A Dnewfs_msdos.c257 char buf[MAXPATHLEN]; local
368 snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname);
369 if (!(fname = strdup(buf)))
501 snprintf(buf, sizeof(buf), "/boot/%s", bname);
502 if (!(bname = strdup(buf)))
680 sprintf(buf, "FAT%u", fat);
681 setstr(bsx->type, buf, sizeof(bsx->type));
/system/vold/
H A Dcryptfs.c1050 char *buf[CRYPT_INPLACE_BUFSIZE]; local
1085 char buf[8]; local
1088 snprintf(buf, sizeof(buf), "%lld", cur_pct);
1089 property_set("vold.encrypt_progress", buf);
1091 if (unix_read(realfd, buf, CRYPT_INPLACE_BUFSIZE) <= 0) {
1095 if (unix_write(cryptofd, buf, CRYPT_INPLACE_BUFSIZE) <= 0) {
1103 if (unix_read(realfd, buf, 512) <= 0) {
1107 if (unix_write(cryptofd, buf, 512) <= 0) {
/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...]

Completed in 202 milliseconds

12345