Searched refs:buf (Results 101 - 125 of 150) sorted by relevance

123456

/system/extras/ext4_utils/
H A Dext4_utils.c258 u8 *buf = calloc(info.block_size, 1); local
259 memcpy(buf + 1024, (u8*)aux_info.sb, 1024);
260 sparse_file_add_data(info.sparse_file, buf, info.block_size, 0);
413 struct stat buf; local
418 ret = fstat(fd, &buf);
425 if (S_ISREG(buf.st_mode))
426 computed_size = buf.st_size - reserve_len;
427 else if (S_ISBLK(buf.st_mode))
H A Dcrc16.c49 u16 ext4_crc16(u16 crc_in, const void *buf, int size) argument
51 const u8 *p = buf;
/system/extras/kexec_tools/
H A Dkexecload.c142 segment[0].buf = zimage_buffer;
147 segment[1].buf = atag_buffer;
/system/netd/
H A DNetdConstants.cpp126 int readFile(const char *path, char *buf, int *sizep) argument
136 size = read(fd, buf, *sizep);
H A DDnsProxyListener.cpp113 uint32_t buf = htonl(hp->h_addrtype); local
114 success &= c->sendData(&buf, sizeof(buf)) == 0;
116 buf = htonl(hp->h_length);
117 success &= c->sendData(&buf, sizeof(buf)) == 0;
/system/core/charger/
H A Dcharger.c206 char *buf; local
214 buf = load_file(LAST_KMSG_PATH, &sz);
215 if (!buf || !sz) {
221 ptr = buf + (sz - len);
241 free(buf);
249 static int read_file(const char *path, char *buf, size_t sz) argument
258 cnt = read(fd, buf, sz - 1);
261 buf[cnt] = '\0';
262 if (buf[cnt - 1] == '\n') {
264 buf[cn
278 char buf[32]; local
[all...]
/system/core/libmincrypt/
H A Dsha256.c60 uint8_t* p = ctx->buf;
143 ctx->buf[i++] = *p++;
153 uint8_t *p = ctx->buf;
174 return ctx->buf;
/system/media/camera/tests/
H A Dcamera_metadata_tests.cpp85 void *buf = NULL; local
95 buf = malloc(buf_size);
97 EXPECT_NOT_NULL(buf);
99 m = place_camera_metadata(buf, buf_size, entry_capacity, data_capacity);
101 EXPECT_EQ(buf, (uint8_t*)m);
109 free(buf);
114 void *buf = NULL; local
126 buf = malloc(buf_size);
128 EXPECT_NOT_NULL(buf);
130 m = place_camera_metadata(buf, buf_siz
139 uint8_t *buf = NULL; local
415 uint8_t *buf = (uint8_t*)malloc(buf_size); local
471 uint8_t *buf = (uint8_t*)malloc(buf_size); local
530 uint8_t *buf = (uint8_t*)malloc(buf_size); local
[all...]
/system/core/libsparse/
H A Dsparse_read.c362 uint32_t *buf = malloc(s->block_size); local
371 if (!buf) {
377 ret = read_all(fd, buf, to_read);
386 if (buf[0] != buf[i]) {
396 /* TODO: add flag to use skip instead of fill for buf[0] == 0 */
397 sparse_file_add_fill(s, buf[0], to_read, block);
H A Dsparse_crc32.c101 uint32_t sparse_crc32(uint32_t crc_in, const void *buf, int size) argument
103 const uint8_t *p = buf;
/system/core/init/
H A Ddevices.c127 char buf[512]; local
145 if ((strlen(upath) + strlen(dp->attr) + 6) > sizeof(buf))
148 sprintf(buf,"/sys%s/%s", upath, dp->attr);
149 INFO("fixup %s %d %d 0%o\n", buf, dp->uid, dp->gid, dp->perm);
150 chown(buf, dp->uid, dp->gid);
151 chmod(buf, dp->perm);
154 selabel_lookup(sehandle, &secontext, buf, 0);
156 setfilecon(buf, secontext);
428 char buf[256]; local
676 char buf[PAGE_SIZ local
[all...]
/system/core/sh/
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 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...]
/system/extras/micro_bench/
H A Dmicro_bench.cpp119 void initString(uint8_t *buf, size_t size) { argument
121 buf[i] = static_cast<char>(32 + (i % 96));
123 buf[size-1] = '\0';
259 // alignment. The variable "buf" will be a pointer to the buffer and should
266 uint8_t *buf = allocateAlignedMemory(size, cmd_data.dst_align, cmd_data.dst_or_mask); \
267 if (!buf) \
295 // the largest cache in the system. The variable "buf" will be one slice
298 // of their "buf" and into the next sequential buffer, the code strides
299 // through the buffer. Specifically, as "buf" values are iterated in BENCH
300 // code, the end of "buf" i
[all...]
/system/core/adb/
H A Dtransport_local.c114 char buf[64]; local
131 snprintf(buf, sizeof buf, "%s%d", LOCAL_CLIENT_PREFIX, console_port);
132 register_socket_transport(fd, buf, adb_port, 1);
H A Dusb_osx.c452 int usb_write(usb_handle *handle, const void *buf, int len) argument
474 handle->interface, handle->bulkOut, (void *)buf, len);
481 handle->interface, handle->bulkOut, (void *)buf, 0);
492 int usb_read(usb_handle *handle, void *buf, int len) argument
517 handle->bulkIn, buf, &numBytes);
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/fastbootd/
H A Dusb_linux_client.c215 static ssize_t bulk_write(int bulk_in, const char *buf, size_t length) argument
221 ret = TEMP_FAILURE_RETRY(write(bulk_in, buf + count, length - count));
251 static ssize_t bulk_read(int bulk_out, char *buf, size_t length) argument
258 ret = TEMP_FAILURE_RETRY(read(bulk_out, buf + n, to_read));
/system/extras/procrank/
H A Dprocrank.c35 static int getprocname(pid_t pid, char *buf, int len);
356 * buf of length len. The size of the buffer must be greater than zero to get
368 static int getprocname(pid_t pid, char *buf, int len) { argument
389 if (fgets(buf, len, f) == NULL) {
405 if (strlcpy(buf, unknown_cmdline, (size_t)len) >= (size_t)len) {
/system/core/libcutils/
H A Dsched_policy.c161 static int getSchedulerGroup(int tid, char* buf, size_t bufLen) argument
203 strncpy(buf, grp, len);
204 buf[len] = '\0';
/system/extras/tests/lib/testUtil/
H A DtestUtil.c310 * pointed to by buf, for the number of bytes given by size.
319 testXDump(const void *buf, size_t size) argument
324 const unsigned char *ptr = buf, *start = buf;
/system/extras/librank/
H A Dlibrank.c51 static int getprocname(pid_t pid, char *buf, size_t len);
444 static int getprocname(pid_t pid, char *buf, size_t len) { argument
450 if (!f) { *buf = '\0'; return 1; }
451 if (!fgets(buf, len, f)) { *buf = '\0'; return 2; }
/system/core/libcorkscrew/arch-x86/
H A Dbacktrace-x86.c120 static uint32_t buf; local
126 if (!try_get_word(memory, lastptr, &buf)) {
130 *out_value = (uint8_t)((buf >> ((ptr & 3) * 8)) & 0xff);
143 uint8_t buf; local
144 if (!try_get_byte(memory, ptr, &buf, cursor)) {
147 data |= (uint32_t)buf << (i * 8);
155 uint8_t buf = 0; local
159 if (!try_get_byte(memory, ptr, &buf, cursor)) {
162 val |= ((uint32_t)buf & 0x7f) << (c * 7);
164 } while (buf
[all...]
/system/core/fs_mgr/
H A Dfs_mgr.c246 static char *fs_getline(char *buf, int size, FILE *file) argument
264 *(buf + cnt) = c;
274 *(buf + cnt) = '\0';
278 return buf;
283 return buf;
293 *buf = '\0';
294 return buf;
/system/extras/libc_test/
H A Dmain.cpp773 uint8_t *buf = reinterpret_cast<uint8_t*>(malloc(MAX_MEMSET_BUFFER_SIZE));
774 if (buf == NULL) {
807 buf_align = (uint8_t*)getAlignedPtr(buf+FENCEPOST_LENGTH, aligns[i][0],
810 buf_align = buf;
825 if (buf_align != buf) {
841 if (buf_align != buf && !verifyFencepost(&buf_align[-8])) {

Completed in 6119 milliseconds

123456