Searched refs:buf (Results 51 - 75 of 150) sorted by relevance

123456

/system/extras/tests/ext4/
H A Drand_emmc_perf.c114 char buf[TST_BLK_SIZE] = { 0 }; local
131 if (write(fd, buf, sizeof(buf)) != sizeof(buf)) {
135 if (read(fd, buf, sizeof(buf)) != sizeof(buf)) {
149 char buf[TST_BLK_SIZE] = { 0 }; local
160 if (write(fd, buf, sizeof(buf)) !
[all...]
/system/core/libutils/tests/
H A DTestHelpers.h53 char buf[1]; local
54 ssize_t nRead = ::read(receiveFd, buf, 1);
/system/core/logwrapper/
H A Dlogwrap.c60 char *buf; member in struct:beginning_buf
67 /* This is a circular buf that holds up to the last ending_buf->buf_size bytes
73 char *buf; member in struct:ending_buf
83 /* A structure to hold all the abbreviated buf data */
114 /* Add to the end of the buf */
115 memcpy(b_buf->buf + b_buf->used_len, line, line_len);
130 if (e_buf->buf == NULL) {
152 memcpy(e_buf->buf + e_buf->write, line, cnt);
154 memcpy(e_buf->buf, line + cnt, line_len - cnt);
173 /* Log to either the abbreviated buf, o
191 print_buf_lines(struct log_info *log_info, char *buf, int buf_size) argument
[all...]
/system/core/include/zipfile/
H A Dzipfile.h48 int decompress_zipentry(zipentry_t entry, void* buf, int bufsize);
/system/extras/sound/
H A Dplaywav.c37 int (*fill)(void *buf, unsigned sz, void *cookie),
43 char buf[8192]; local
64 if (sz > sizeof(buf)) {
71 if (fill(buf, sz, cookie))
73 if (write(afd, buf, sz) != sz)
85 if (fill(buf, sz, cookie))
87 if (write(afd, buf, sz) != sz)
125 int fill_buffer(void *buf, unsigned sz, void *cookie) argument
129 memcpy(buf, next, sz);
194 unsigned char buf[819 local
36 pcm_play(unsigned rate, unsigned channels, int (*fill)(void *buf, unsigned sz, void *cookie), void *cookie) argument
297 char buf[64*1024]; local
[all...]
/system/netd/
H A DNetdConstants.h37 int readFile(const char *path, char *buf, int *sizep);
H A DInterfaceController.h24 char *buf; member in struct:android_wifi_priv_cmd
/system/core/sh/
H A Dinput.c95 char *buf; /* input buffer */ member in struct:parsefile
124 basepf.nextc = basepf.buf = basebuf;
186 char *buf = parsefile->buf; local
187 parsenextc = buf;
203 memcpy(buf, rl_cp, nr);
238 memcpy(buf, rl_cp, nr);
252 nr = read(parsefile->fd, buf, BUFSIZ - 8);
298 if (parsenleft == EOF_NLEFT || parsefile->buf == NULL)
464 parsefile->buf
[all...]
H A Darith_lex.l54 #define YY_INPUT(buf,result,max) \
55 result = (*buf = *arith_buf++) ? 1 : YY_NULL;
/system/extras/sane_schedstat/
H A Dsane_schedstat.c144 char buf[4096]; local
149 i = read(fd, buf, sizeof(buf) - 1);
151 buf[i] = '\0';
152 if (parse(buf)) return -1;
/system/extras/tests/bionic/libc/common/
H A Dtest_udp.c45 char buf[BUFLEN]; local
89 if (recvfrom(s, buf, BUFLEN, 0, (struct sockaddr*)&si_other, (socklen_t*)&slen)==-1)
92 inet_ntoa(si_other.sin_addr), ntohs(si_other.sin_port), buf);
112 sprintf(buf, "This is packet %d\n", i);
113 if (sendto(s, buf, BUFLEN, 0, (struct sockaddr*)&si_other, slen)==-1)
/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/adb/
H A Dadb_auth_client.c56 char buf[MAX_PAYLOAD]; local
66 while (fgets(buf, sizeof(buf), f)) {
74 sep = strpbrk(buf, " \t");
78 ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
112 struct stat buf; local
117 if (!stat(path, &buf)) {
H A Dadb.c288 static size_t fill_connect_data(char *buf, size_t bufsize) argument
291 return snprintf(buf, bufsize, "host::") + 1;
303 len = snprintf(buf, remaining, "%s::", adb_device_banner);
305 buf += len;
309 len = snprintf(buf, remaining, "%s=%s;", cnxn_props[i], value);
311 buf += len;
767 static int format_listeners(char* buf, size_t buflen) argument
775 int len = format_listener(l, buf, buflen);
778 if (buf != NULL) {
779 buf
1394 char buf[4096]; local
[all...]
/system/core/toolbox/
H A Dcat.c153 static char *buf; local
162 if (buf == NULL) {
166 buf = malloc(bsize);
168 if (buf == NULL) {
169 buf = fb_buf;
173 while ((nr = read(rfd, buf, bsize)) > 0)
175 if ((nw = write(wfd, buf + off, (size_t)nr)) < 0)
H A Dreadtty.c60 char buf[1]; local
119 res = read(STDIN_FILENO, buf, 1);
138 if(accept && strchr(accept, buf[0]) == NULL) {
148 //if(!isprint(buf[0])) {
149 // fprintf(stderr, "got unprintable character 0x%x\n", buf[0]);
151 if(buf[0] == '\0') {
159 if(current_char && buf[0] != last_char_in) {
171 last_char_in = buf[0];
177 write(STDOUT_FILENO, buf, 1);
/system/core/init/
H A Dutil.c197 char buf[1024]; local
206 buf[sizeof(buf) - 1] = '\0';
207 pmtdsize = read(fd, buf, sizeof(buf) - 1);
208 pmtdbufp = buf;
277 char buf[128]; local
291 if ((unsigned int)width > sizeof(buf) - 1) {
295 memcpy(buf, pathname, width);
296 buf[widt
333 char buf[256]; local
[all...]
/system/core/libmincrypt/
H A Drsa.c254 uint8_t buf[RSANUMBYTES]; local
262 if (len != sizeof(buf)) {
276 buf[i] = signature[i];
279 modpow(key, buf); // In-place exponentiation.
283 buf[i] ^= *hash++;
286 // Hash resulting buf, in-place.
290 SHA_hash(buf, len, buf);
294 SHA256_hash(buf, len, buf);
[all...]
/system/core/libcutils/
H A Ddir_hash.c57 char buf[PATH_MAX]; local
60 len = readlink(path, buf, sizeof(buf));
66 SHA1Update(&context, (unsigned char *) buf, len);
69 char buf[10000]; local
79 while ((len = fread(buf, 1, sizeof(buf), f)) > 0) {
80 SHA1Update(&context, (unsigned char *) buf, len);
274 char *buf; local
303 buf
[all...]
/system/core/include/log/
H A Dlogprint.h104 * entry allocated by caller. Pointers will point directly into buf
109 int android_log_processLogBuffer(struct logger_entry *buf,
118 int android_log_processBinaryLogBuffer(struct logger_entry *buf,
/system/extras/tests/directiotest/
H A Ddirectiotest.c70 static ssize_t do_read(int fd, void *buf, off64_t start, size_t count) argument
78 ret = read(fd, (char *)buf + bytes_read, count - bytes_read);
92 static ssize_t do_write(int fd, const void *buf, off64_t start, size_t count) argument
100 ret = write(fd, (char *)buf + bytes_out, count - bytes_out);
122 static void init_test_buf(void *buf, uint64_t start_blk, size_t len) argument
124 uint32_t *data = buf;
132 static void dump_hex(const void *buf, int len) argument
134 const uint8_t *data = buf;
/system/media/audio_utils/
H A Dresampler.c107 struct resampler_buffer buf; local
108 buf.frame_count = rsmp->frames_needed - rsmp->frames_in;
109 rsmp->provider->get_next_buffer(rsmp->provider, &buf);
110 if (buf.raw == NULL) {
114 buf.raw,
115 buf.frame_count * rsmp->channel_count * sizeof(int16_t));
116 rsmp->frames_in += buf.frame_count;
117 rsmp->provider->release_buffer(rsmp->provider, &buf);
/system/core/fastboot/
H A Dusbtest.c92 unsigned char buf[4096]; local
93 memset(buf, 0xee, 4096);
98 if(usb_write(usb, buf, arg_size) != arg_size) {
111 unsigned char buf[4096]; local
116 if(usb_read(usb, buf, arg_size) != arg_size) {
/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::__anon235
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...]

Completed in 428 milliseconds

123456