Searched defs:buf (Results 26 - 50 of 130) sorted by relevance

123456

/system/core/libcutils/
H A Dashmem-host.c98 struct stat buf; local
101 result = fstat(fd, &buf);
108 if (!(buf.st_nlink == 0 && S_ISREG(buf.st_mode))) {
113 return (int)buf.st_size; // TODO: care about overflow (> 2GB file)?
H A Dfs.c91 char buf[BUF_SIZE]; local
92 if (TEMP_FAILURE_RETRY(read(fd, buf, BUF_SIZE)) == -1) {
96 if (sscanf(buf, "%d", out_value) != 1) {
122 char buf[BUF_SIZE]; local
123 int len = snprintf(buf, BUF_SIZE, "%d", value) + 1;
128 if (TEMP_FAILURE_RETRY(write(fd, buf, len)) < len) {
157 char* buf = strdup(path); local
159 if (*buf != '/') {
160 ALOGE("Relative paths are not allowed: %s", buf);
171 char* segment = buf
[all...]
H A Dopen_memstream.c123 static int write_memstream(void* cookie, const char* buf, int size) argument
139 memcpy(*stream->bufp + stream->offset, buf, size);
285 char *buf;
292 stream = open_memstream(&buf, &len);
295 printf("buf=%s, len=%zu\n", buf, len);
301 printf("buf=%s, len=%zu\n", buf, len);
302 free(buf);
307 stream = open_memstream(&buf,
[all...]
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/libpixelflinger/codeflinger/tinyutils/
H A DSharedBuffer.cpp63 SharedBuffer* buf = const_cast<SharedBuffer*>(this); local
64 if (buf->mSize == newSize) return buf;
65 buf = (SharedBuffer*)realloc(buf, sizeof(SharedBuffer) + newSize);
66 if (buf != NULL) {
67 buf->mSize = newSize;
68 return buf;
/system/core/libsuspend/
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/libutils/tests/
H A DBlobCache_test.cpp47 char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
49 ASSERT_EQ(size_t(4), mBC->get("abcd", 4, buf, 4));
50 ASSERT_EQ('e', buf[0]);
51 ASSERT_EQ('f', buf[1]);
52 ASSERT_EQ('g', buf[2]);
53 ASSERT_EQ('h', buf[3]);
57 char buf[2] = { 0xee, 0xee }; local
60 ASSERT_EQ(size_t(2), mBC->get("ab", 2, buf, 2));
61 ASSERT_EQ('c', buf[0]);
62 ASSERT_EQ('d', buf[
69 char buf[6] = { 0xee, 0xee, 0xee, 0xee, 0xee, 0xee }; local
81 char buf[3] = { 0xee, 0xee, 0xee }; local
95 char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
106 char buf[MAX_VALUE_SIZE+1] = { 0xee, 0xee, 0xee, 0xee }; local
118 char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
131 char buf[MAX_VALUE_SIZE+1]; local
285 char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
351 char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
368 char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
387 char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
406 char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
[all...]
H A DTestHelpers.h53 char buf[1]; local
54 ssize_t nRead = ::read(receiveFd, buf, 1);
/system/core/toolbox/
H A Ddate.c82 char buf[2000]; local
H A Dnotify.c27 char *buf; local
82 buf = malloc(width + 2);
116 read_len = read(ffd, buf, buflen);
118 if(read_len < buflen && buf[read_len-1] != '\n') {
119 buf[read_len] = '\n';
123 buf[--read_len] = '\0';
124 buf[--read_len] = '\n';
125 buf[--read_len] = '.';
126 buf[--read_len] = '.';
127 buf[
[all...]
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/adb/
H A Dframebuffer_service.c59 char buf[640]; local
167 for(i = 0; i < fbinfo.size; i += sizeof(buf)) {
168 if(readx(fd_screencap, buf, sizeof(buf))) goto done;
169 if(writex(fd, buf, sizeof(buf))) goto done;
171 if(readx(fd_screencap, buf, fbinfo.size % sizeof(buf))) goto done;
172 if(writex(fd, buf, fbinfo.size % sizeof(buf))) got
[all...]
H A Dremount_service.c41 char buf[4096]; local
47 buf[sizeof(buf) - 1] = '\0';
48 size = adb_read(fd, buf, sizeof(buf) - 1);
51 token = strtok(buf, delims);
H A Dadb_client.c142 unsigned char buf[5]; local
145 if(readx(fd, buf, 4)) {
150 if(!memcmp(buf, "OKAY", 4)) {
154 if(memcmp(buf, "FAIL", 4)) {
157 buf[0], buf[1], buf[2], buf[3]);
161 if(readx(fd, buf, 4)) {
165 buf[
243 char buf[100]; local
310 char buf[5]; local
[all...]
/system/core/debuggerd/
H A Dutility.c36 static int write_to_am(int fd, const char* buf, int len) { argument
39 int written = TEMP_FAILURE_RETRY( write(fd, buf + len - to_write, to_write) );
51 char buf[512]; local
67 vsnprintf(buf, sizeof(buf), fmt, ap);
68 len = strlen(buf);
72 write(log->tfd, buf, len);
79 int written = write_to_am(log->amfd, buf, len);
H A Dcrasher.c49 char buf[8]; local
53 *(int*)(&buf[7]) = (uintptr_t) &buf[0];
54 return *(int*)(&buf[0]);
60 void* buf[1]; local
61 buf[0] = p;
62 global = buf;
63 overflow_stack(&buf);
125 char buf[16]; local
126 free((void*) buf); // GC
[all...]
/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/libmemtrack/
H A Dmemtrack_test.c28 static int getprocname(pid_t pid, char *buf, int len) { argument
49 if (fgets(buf, len, f) == NULL) {
65 if (strlcpy(buf, unknown_cmdline, (size_t)len) >= (size_t)len) {
/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/libzipfile/
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);
/system/extras/fatblock/
H A Dread.c28 static int buffer_read(char *buf, offset_t buf_len, char *out, argument
31 assert(buf);
47 memcpy(out, buf + off, len);
72 static int file_read(struct file *f, char *buf, offset_t off, offset_t len) argument
79 assert(buf);
114 ret = read(fd, buf, (size_t)len);
126 static int dir_read(struct dir *d, char *buf, offset_t off, offset_t len) argument
129 assert(buf);
131 return buffer_read((char*)d->entries, d->size, buf, off, len);
134 static int extent_read(struct fs *fs, struct extent *e, char *buf, argument
161 fs_read(struct fs *fs, char *buf, offset_t start, offset_t len) argument
[all...]
/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/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/liblog/
H A Dlogd_write.c207 char buf[LOG_BUF_SIZE]; local
209 vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
211 return __android_log_write(prio, tag, buf);
217 char buf[LOG_BUF_SIZE]; local
220 vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
223 return __android_log_write(prio, tag, buf);
229 char buf[LOG_BUF_SIZE]; local
232 vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
235 return __android_log_buf_write(bufID, prio, tag, buf);
241 char buf[LOG_BUF_SIZ local
[all...]

Completed in 303 milliseconds

123456