Searched refs:buf (Results 1 - 25 of 173) sorted by relevance

1234567

/system/core/libprocessgroup/
H A Dcleanup.cpp24 char buf[PATH_MAX]; local
28 memcpy(buf, PROCESSGROUP_CGROUP_PATH, sizeof(PROCESSGROUP_CGROUP_PATH));
29 strlcat(buf, argv[1], sizeof(buf));
30 return rmdir(buf);
/system/core/libcutils/
H A Dpartition_utils.c26 static int only_one_char(char *buf, int len, char c) argument
32 if (buf[i] != c) {
42 char buf[4096]; local
49 ret = read(fd, buf, sizeof(buf));
52 if (ret != sizeof(buf)) {
57 if (only_one_char(buf, sizeof(buf), 0)) {
62 if (only_one_char(buf, sizeof(buf),
[all...]
/system/core/libsuspend/
H A Dautosuspend_wakeup_count.c45 char buf[80]; local
56 strerror_r(errno, buf, sizeof(buf));
57 ALOGE("Error reading from %s: %s\n", SYS_POWER_WAKEUP_COUNT, buf);
69 strerror_r(errno, buf, sizeof(buf));
70 ALOGE("Error waiting on semaphore: %s\n", buf);
77 strerror_r(errno, buf, sizeof(buf));
78 ALOGE("Error writing to %s: %s\n", SYS_POWER_WAKEUP_COUNT, buf);
105 char buf[80]; local
124 char buf[80]; local
158 char buf[80]; local
[all...]
H A Dautosuspend_autosleep.c38 char buf[80]; local
45 strerror_r(errno, buf, sizeof(buf));
46 ALOGE("Error writing to %s: %s\n", SYS_POWER_AUTOSLEEP, buf);
60 char buf[80]; local
67 strerror_r(errno, buf, sizeof(buf));
68 ALOGE("Error writing to %s: %s\n", SYS_POWER_AUTOSLEEP, buf);
88 char buf[80]; local
92 strerror_r(errno, buf, sizeo
[all...]
H A Dautosuspend_earlysuspend.c51 char buf; local
55 err = read(fd, &buf, 1);
66 char buf; local
70 err = read(fd, &buf, 1);
102 char buf[80]; local
109 strerror_r(errno, buf, sizeof(buf));
110 ALOGE("Error writing to %s: %s\n", EARLYSUSPEND_SYS_POWER_STATE, buf);
132 char buf[80]; local
139 strerror_r(errno, buf, sizeo
167 char buf[80]; local
195 char buf[80]; local
[all...]
/system/core/libsparse/
H A Dsparse_crc32.h19 uint32_t sparse_crc32(uint32_t crc, const void *buf, size_t size);
/system/core/toolbox/
H A Dpwcache.c46 static char buf[32]; local
47 snprintf(buf, sizeof(buf), "%lu", (long) gid);
48 return noname ? NULL : buf;
56 static char buf[32]; local
57 snprintf(buf, sizeof(buf), "%lu", (long) uid);
58 return noname ? NULL : buf;
/system/core/libzipfile/
H A Dcentraldir.c24 read_le_int(const unsigned char* buf) argument
26 return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
30 read_le_short(const unsigned char* buf) argument
32 return buf[0] | (buf[1] << 8);
36 read_central_dir_values(Zipfile* file, const unsigned char* buf, int len) argument
45 file->disknum = read_le_short(&buf[
66 read_central_directory_entry(Zipfile* file, Zipentry* entry, const unsigned char** buf, ssize_t* len) argument
154 const unsigned char* buf = file->buf; local
[all...]
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/core/libutils/tests/
H A DBlobCache_test.cpp47 unsigned 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 unsigned 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 unsigned char buf[6] = { 0xee, 0xee, 0xee, 0xee, 0xee, 0xee }; local
81 unsigned char buf[3] = { 0xee, 0xee, 0xee }; local
95 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
106 unsigned char buf[MAX_VALUE_SIZE+1] = { 0xee, 0xee, 0xee, 0xee }; local
118 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
131 char buf[MAX_VALUE_SIZE+1]; local
285 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
351 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
368 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
387 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
406 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
[all...]
/system/core/logd/
H A DCommandListener.cpp35 CommandListener::CommandListener(LogBuffer *buf, LogReader * /*reader*/, argument
38 , mBuf(*buf) {
39 // registerCmd(new ShutdownCmd(buf, writer, swl));
40 registerCmd(new ClearCmd(buf));
41 registerCmd(new GetBufSizeCmd(buf));
42 registerCmd(new SetBufSizeCmd(buf));
43 registerCmd(new GetBufSizeUsedCmd(buf));
44 registerCmd(new GetStatisticsCmd(buf));
45 registerCmd(new SetPruneListCmd(buf));
46 registerCmd(new GetPruneListCmd(buf));
49 ShutdownCmd(LogBuffer *buf, LogReader *reader, LogListener *swl) argument
65 ClearCmd(LogBuffer *buf) argument
98 GetBufSizeCmd(LogBuffer *buf) argument
118 char buf[512]; local
124 SetBufSizeCmd(LogBuffer *buf) argument
158 GetBufSizeUsedCmd(LogBuffer *buf) argument
178 char buf[512]; local
184 GetStatisticsCmd(LogBuffer *buf) argument
228 char *buf = NULL; local
241 GetPruneListCmd(LogBuffer *buf) argument
249 char *buf = NULL; local
261 SetPruneListCmd(LogBuffer *buf) argument
[all...]
/system/extras/tests/bionic/libc/glibc/assert/
H A Dtest-assert.c15 char buf[160]; variable
75 fgets (buf, 160, stderr);
76 if (!strstr (buf, "1 == 2"))
79 fgets (buf, 160, stderr);
80 if (strstr (buf, "1 == 1"))
83 fgets (buf, 160, stderr);
84 if (strstr (buf, "2 == 3"))
/system/extras/f2fs_utils/
H A Df2fs_ioutils.c91 void *buf; member in struct:buf_item
98 static int dev_write_fd(void *buf, __u64 offset, size_t len) argument
102 if (write(config.fd, buf, len) != len)
112 free(bi->buf);
117 static int dev_write_sparse(void *buf, __u64 byte_offset, size_t byte_len) argument
124 bi->buf = malloc(byte_len);
125 if (bi->buf == NULL) {
131 memcpy(bi->buf, buf, byte_len);
135 sparse_file_add_data(f2fs_sparse_file, bi->buf, byte_le
151 dev_read(void *buf, __u64 offset, size_t len) argument
156 dev_write(void *buf, __u64 offset, size_t len) argument
166 dev_fill(void *buf, __u64 offset, size_t len) argument
177 dev_read_block(void *buf, __u64 blk_addr) argument
183 dev_read_blocks(void *buf, __u64 addr, __u32 nr_blks) argument
[all...]
/system/core/liblog/
H A Duio.c27 char* buf = vecs->iov_base; local
31 int ret = read( fd, buf, len );
41 buf += ret;
54 const char* buf = vecs->iov_base; local
58 int ret = write( fd, buf, len );
68 buf += ret;
/system/keymaster/
H A Dgoogle_keymaster_messages.cpp29 uint8_t* KeymasterResponse::Serialize(uint8_t* buf, const uint8_t* end) const { argument
30 buf = append_uint32_to_buf(buf, end, static_cast<uint32_t>(error));
32 buf = NonErrorSerialize(buf, end);
33 return buf;
48 uint8_t* SupportedAlgorithmsResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { argument
49 return append_uint32_array_to_buf(buf, end, algorithms, algorithms_length);
71 uint8_t* GenerateKeyResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { argument
72 buf
104 Serialize(uint8_t* buf, const uint8_t* end) const argument
125 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
146 Serialize(uint8_t* buf, const uint8_t* end) const argument
169 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
181 Serialize(uint8_t* buf, const uint8_t* end) const argument
194 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
206 Serialize(uint8_t* buf, const uint8_t* end) const argument
219 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
238 Serialize(uint8_t* buf, const uint8_t* end) const argument
267 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
296 Serialize(uint8_t* buf, const uint8_t* end) const argument
325 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
[all...]
H A Dgoogle_keymaster_utils.cpp21 uint8_t* dup_buffer(const void* buf, size_t size) { argument
24 memcpy(retval, buf, size);
/system/extras/ext4_utils/
H A Dsetup_fs.c14 char buf[256], path[128]; local
32 snprintf(buf, sizeof(buf), "/sys/fs/ext4/%s", blockdev);
33 if (access(buf, F_OK) == 0) {
37 snprintf(buf, sizeof(buf), "/dev/block/%s", blockdev);
39 if (!partition_wiped(buf)) {
52 execl(mkfs, mkfs, buf, NULL);
/system/core/adb/
H A Dcommandline.c267 char buf[4096]; local
272 len = adb_read(fd, buf, 4096);
282 fwrite(buf, 1, len, stdout);
287 static void read_status_line(int fd, char* buf, size_t count) argument
291 int len = adb_read(fd, buf, count);
299 buf += len;
302 *buf = '\0';
307 char* buf = (char*) malloc(BUFSIZE); local
319 len = unix_read(inFd, buf, BUFSIZE);
321 len = adb_read(inFd, buf, BUFSIZ
355 unsigned char buf[1024]; local
452 char buf[4096]; local
562 char buf[100]; local
798 send_shellcommand(transport_type transport, char* serial, char* buf) argument
821 char buf[4096]; local
869 char buf[4096]; local
1123 char buf[4096]; local
1836 char buf[4096]; local
1871 char buf[4096]; local
1949 char buf[1024]; local
[all...]
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
313 char buf[5]; local
[all...]
/system/core/libutils/
H A DString8.cpp62 SharedBuffer* buf = SharedBuffer::alloc(1); local
63 char* str = (char*)buf->data();
65 gEmptyStringBuf = buf;
81 SharedBuffer* buf = SharedBuffer::alloc(len+1); local
82 ALOG_ASSERT(buf, "Unable to allocate shared buffer");
83 if (buf) {
84 char* str = (char*)buf->data();
104 SharedBuffer* buf = SharedBuffer::alloc(bytes+1); local
105 ALOG_ASSERT(buf, "Unable to allocate shared buffer");
106 if (!buf) {
126 SharedBuffer* buf = SharedBuffer::alloc(bytes+1); local
339 char* buf = lockBuffer(oldLength + n); local
353 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local
368 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local
386 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local
415 char* buf = lockBuffer(size()); local
449 char* buf = lockBuffer(len); local
473 char* buf = lockBuffer(len); local
508 char* buf = lockBuffer(len); local
524 const char*const buf = mString; local
549 const char* buf = str; local
638 char* buf = lockBuffer(len+1+newlen); local
661 char * buf = lockBuffer(len); local
[all...]
H A DSharedBuffer.cpp61 SharedBuffer* buf = const_cast<SharedBuffer*>(this); local
62 if (buf->mSize == newSize) return buf;
63 buf = (SharedBuffer*)realloc(buf, sizeof(SharedBuffer) + newSize);
64 if (buf != NULL) {
65 buf->mSize = newSize;
66 return buf;
/system/core/libnativebridge/tests/
H A DPreInitializeNativeBridge_test.cpp50 char buf[1024]; local
51 EXPECT_NE(nullptr, fgets(buf, sizeof(buf), proc_cpuinfo)) << "Error reading.";
54 EXPECT_EQ(0, strcmp(buf, kTestData));
/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/include/cutils/
H A Dtrace.h187 char buf[ATRACE_MESSAGE_LENGTH]; local
190 len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "B|%d|%s", getpid(), name);
191 write(atrace_marker_fd, buf, len);
221 char buf[ATRACE_MESSAGE_LENGTH]; local
224 len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "S|%d|%s|%" PRId32,
226 write(atrace_marker_fd, buf, len);
239 char buf[ATRACE_MESSAGE_LENGTH]; local
242 len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "F|%d|%s|%" PRId32,
244 write(atrace_marker_fd, buf, len);
257 char buf[ATRACE_MESSAGE_LENGT local
274 char buf[ATRACE_MESSAGE_LENGTH]; local
[all...]
/system/core/libion/tests/
H A Ddevice_test.cpp37 void readDMA(int fd, void *buf, size_t size);
38 void writeDMA(int fd, void *buf, size_t size);
39 void readKernel(int fd, void *buf, size_t size);
40 void writeKernel(int fd, void *buf, size_t size);
58 void Device::readDMA(int fd, void *buf, size_t size) argument
62 .ptr = (uint64_t)buf,
72 void Device::writeDMA(int fd, void *buf, size_t size) argument
76 .ptr = (uint64_t)buf,
86 void Device::readKernel(int fd, void *buf, size_t size) argument
90 .ptr = (uint64_t)buf,
100 writeKernel(int fd, void *buf, size_t size) argument
137 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
171 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
205 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
237 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
271 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
305 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
339 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
373 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
408 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
442 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
476 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
508 void *buf = (void *)(ALIGN((unsigned long)alloc, 4096) + 1024); local
541 void *buf = malloc(4096); local
[all...]

Completed in 855 milliseconds

1234567