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

123456

/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/core/libmincrypt/
H A Dsha.c64 (W[t] = bswap_32(ctx->buf.w[t])) + \
148 int i = ctx->count % sizeof(ctx->buf);
153 while (len > sizeof(ctx->buf) - i) {
154 memcpy(&ctx->buf.b[i], p, sizeof(ctx->buf) - i);
155 len -= sizeof(ctx->buf) - i;
156 p += sizeof(ctx->buf) - i;
162 ctx->buf.b[i++] = *p++;
163 if (i == sizeof(ctx->buf)) {
176 while ((ctx->count % sizeof(ctx->buf)) !
[all...]
/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;
H A Doutput.h44 char *buf; member in struct:output
/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.c53 char buf[MAX_PAYLOAD]; local
63 while (fgets(buf, sizeof(buf), f)) {
71 sep = strpbrk(buf, " \t");
75 ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
109 struct stat buf; local
114 if (!stat(path, &buf)) {
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 Dadb_auth_host.c110 static void get_user_info(char *buf, size_t len) argument
127 ret = snprintf(buf, len, " %s@%s", username, hostname);
129 buf[len - 1] = '\0';
264 struct stat buf; local
286 if (stat(android_dir, &buf)) {
298 struct stat buf; local
310 if (stat(path, &buf) == -1) {
326 struct stat buf; local
337 if (stat(path, &buf))
/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/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/cutils/
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::__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/bluetooth/tools/
H A Dpipetest.c72 static int _write(int fd, char *buf, int len) { argument
76 ret = write(fd, buf, len);
85 char buf; local
88 ret = read(fd, &buf, 1);
89 printf("%d: read(%d) = %d [%d]\n", gettid(), fd, ret, (int)buf);
271 char buf = 'a'; local
282 _write(fd[1], &buf, 1);
294 char buf = 'a'; local
304 _write(fd[1], &buf, 1);
/system/extras/fatblock/
H A Dfatblock.c52 static int read_callback(char *buf, uint64_t length, uint64_t offset) argument
57 result = fs_read(&fs, buf, offset, length);
66 static int write_callback(const char *buf, uint64_t length, uint64_t offset) argument
H A Dfatblock.h68 int fs_read(struct fs *fs, char *buf, offset_t start, offset_t len);
/system/core/libsparse/
H A Doutput_file.h39 int read_all(int fd, void *buf, size_t len);
/system/core/libzipfile/
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);

Completed in 290 milliseconds

123456