Searched defs:buffer (Results 26 - 50 of 69) sorted by relevance

123

/system/netd/
H A Dndc.c107 char *buffer = malloc(4096); local
125 free(buffer);
132 memset(buffer, 0, 4096);
133 if ((rc = read(sock, buffer, 4096)) <= 0) {
138 free(buffer);
148 if (buffer[i] == '\0') {
152 strncpy(tmp, buffer + offset, 3);
156 printf("%s\n", buffer + offset);
166 free(buffer);
H A DNatController.cpp49 char *buffer; local
59 asprintf(&buffer, "%s %s", path, cmd);
60 res = system_nosh(buffer);
61 ALOGV("runCmd() buffer='%s' res=%d", buffer, res);
62 free(buffer);
H A Dlogwrapper.c31 char buffer[4096]; local
36 while ((sz = read(parent_read, &buffer[b], sizeof(buffer) - 1 - b)) > 0) {
41 if (buffer[b] == '\r') {
42 buffer[b] = '\0';
43 } else if (buffer[b] == '\n') {
44 buffer[b] = '\0';
46 ALOG(LOG_INFO, tag, "%s", &buffer[a]);
51 if (a == 0 && b == sizeof(buffer) - 1) {
52 // buffer i
171 char buffer[255]; local
[all...]
/system/vold/
H A DProcess.cpp66 void Process::getProcessName(int pid, char *buffer, size_t max) { argument
68 snprintf(buffer, max, "/proc/%d/cmdline", pid);
69 fd = open(buffer, O_RDONLY);
71 strcpy(buffer, "???");
73 int length = read(fd, buffer, max - 1);
74 buffer[length] = 0;
130 char buffer[PATH_MAX + 100]; local
132 sprintf(buffer, "/proc/%d/maps", pid);
133 file = fopen(buffer, "r");
137 while (fgets(buffer, sizeo
[all...]
H A Dlogwrapper.c32 char buffer[4096]; local
37 while ((sz = read(parent_read, &buffer[b], sizeof(buffer) - 1 - b)) > 0) {
42 if (buffer[b] == '\r') {
43 buffer[b] = '\0';
44 } else if (buffer[b] == '\n') {
45 buffer[b] = '\0';
47 ALOG(LOG_INFO, tag, "%s", &buffer[a]);
52 if (a == 0 && b == sizeof(buffer) - 1) {
53 // buffer i
[all...]
H A DDevmapper.cpp43 char *buffer = (char *) malloc(1024 * 64); local
44 if (!buffer) {
48 memset(buffer, 0, (1024 * 64));
53 free(buffer);
60 free(buffer);
65 struct dm_ioctl *io = (struct dm_ioctl *) buffer;
70 free(buffer);
76 struct dm_name_list *n = (struct dm_name_list *) (((char *) buffer) + io->data_start);
78 free(buffer);
111 free(buffer);
134 char *buffer = (char *) malloc(DEVMAPPER_BUFFER_SIZE); local
168 char *buffer = (char *) malloc(DEVMAPPER_BUFFER_SIZE); local
265 char *buffer = (char *) malloc(DEVMAPPER_BUFFER_SIZE); local
[all...]
H A DLoop.cpp81 int Loop::lookupActive(const char *id, char *buffer, size_t len) { argument
86 memset(buffer, 0, len);
123 strncpy(buffer, filename, len -1);
254 struct asec_superblock buffer; local
272 memset(&buffer, 0, sizeof(struct asec_superblock));
279 if (read(fd, &buffer, sizeof(struct asec_superblock)) != sizeof(struct asec_superblock)) {
290 memcpy(sb, &buffer, sizeof(struct asec_superblock));
H A DCommandListener.cpp54 char buffer[4096]; local
55 char *p = buffer;
57 memset(buffer, 0, sizeof(buffer));
64 if (((p - buffer) + len) < (sizeof(buffer)-1)) {
78 SLOGD("%s", buffer);
/system/bluetooth/bluedroid/
H A Dbluetooth.c78 char buffer; local
90 sz = read(fd, &buffer, 1);
97 switch (buffer) {
115 const char buffer = (on ? '1' : '0'); local
127 sz = write(fd, &buffer, 1);
/system/core/adb/
H A Dfile_sync_service.c101 if it does happen, let's not buffer overrun */
151 static int handle_send_file(int s, char *path, mode_t mode, char *buffer) argument
190 if(readx(s, buffer, len))
195 if(writex(fd, buffer, len)) {
227 static int handle_send_link(int s, char *path, char *buffer) argument
246 if(readx(s, buffer, len))
249 ret = symlink(buffer, path);
252 ret = symlink(buffer, path);
276 static int do_send(int s, char *path, char *buffer) argument
304 ret = handle_send_link(s, path, buffer);
319 do_recv(int s, const char *path, char *buffer) argument
365 char *buffer = malloc(SYNC_DATA_MAX); local
[all...]
H A Djdwp_service.c122 jdwp_process_list( char* buffer, int bufferlen ) argument
124 char* end = buffer + bufferlen;
125 char* p = buffer;
141 return (p - buffer);
146 jdwp_process_list_msg( char* buffer, int bufferlen ) argument
149 int len = jdwp_process_list( buffer+4, bufferlen-4 );
151 memcpy(buffer, head, 4);
323 char buffer[sizeof(struct cmsghdr) + sizeof(int)]; local
333 msg.msg_control = buffer;
334 msg.msg_controllen = sizeof(buffer);
638 char buffer[1024]; local
[all...]
H A Dusb_libusb.c489 uint16_t buffer[128] = {0}; local
507 memset(buffer, 0, sizeof(buffer));
512 languages[i], (uint8_t *)buffer, sizeof(buffer), 0);
519 serial[j - 1] = buffer[j];
/system/core/libctest/
H A Dctest.c78 char buffer[512]; local
80 while ((read = fread(buffer, sizeof(char), 512, suite->out)) > 0) {
82 fwrite(buffer, sizeof(char), read, stderr);
/system/core/libnetutils/
H A Dpacket.c65 static uint32_t checksum(void *buffer, unsigned int count, uint32_t startsum) argument
67 uint16_t *up = (uint16_t *)buffer;
/system/core/libsysutils/src/
H A DFrameworkListener.cpp46 char buffer[255]; local
49 len = TEMP_FAILURE_RETRY(read(c->getSocket(), buffer, sizeof(buffer)));
60 if (buffer[i] == '\0') {
62 dispatchCommand(c, buffer + offset);
H A DNetlinkEvent.cpp75 bool NetlinkEvent::parseBinaryNetlinkMessage(char *buffer, int size) { argument
77 const struct nlmsghdr *nh = (struct nlmsghdr *) buffer;
102 char buffer[16 + IFNAMSIZ]; local
103 snprintf(buffer, sizeof(buffer), "INTERFACE=%s",
105 mParams[0] = strdup(buffer);
163 bool NetlinkEvent::parseAsciiNetlinkMessage(char *buffer, int size) { argument
164 const char *s = buffer;
173 /* Ensure the buffer is zero-terminated, the code below depends on this */
174 buffer[siz
210 decode(char *buffer, int size, int format) argument
[all...]
/system/core/toolbox/
H A Dlsof.c102 char buffer[PATH_MAX + 100]; local
H A Dnandread.c32 void *buffer; local
138 buffer = malloc(mtdinfo.writesize + mtdinfo.oobsize + spare_size);
139 if (!buffer) {
146 oob_data = (uint32_t *)((uint8_t *)buffer + mtdinfo.writesize);
194 ret = read(fd, buffer, mtdinfo.writesize + rawmode);
242 ret = write(outfd, buffer, mtdinfo.writesize + spare_size);
261 if (test_empty(buffer, mtdinfo.writesize + mtdinfo.oobsize + spare_size))
H A Dmount.c219 char buffer[100]; local
228 length = fread(buffer, 1, 100, f);
230 fwrite(buffer, 1, length, stdout);
/system/core/fastboot/
H A Dusb_linux.c140 __u16 buffer[127]; local
142 memset(buffer, 0, sizeof(buffer));
149 ctrl.wLength = sizeof(buffer);
150 ctrl.data = buffer;
159 info.serial_number[i - 1] = buffer[i];
H A Dusb_osx.c337 UInt16 buffer[256]; local
344 req.pData = buffer;
345 req.wLength = sizeof(buffer);
354 handle->info.serial_number[i] = buffer[i + 1];
/system/core/libcorkscrew/
H A Dbacktrace.c309 const backtrace_symbol_t* symbol, char* buffer, size_t bufferSize) {
316 snprintf(buffer, bufferSize, "#%02d pc %08x %.*s (%.*s+%u)",
320 snprintf(buffer, bufferSize, "#%02d pc %08x %.*s (%.*s)",
325 snprintf(buffer, bufferSize, "#%02d pc %08x %.*s",
308 format_backtrace_line(unsigned frameNumber, const backtrace_frame_t* frame __attribute__((unused)), const backtrace_symbol_t* symbol, char* buffer, size_t bufferSize) argument
/system/core/run-as/
H A Dpackage.c47 /* Copy 'srclen' string bytes from 'src' into buffer 'dst' of size 'dstlen'
48 * This function always zero-terminate the destination buffer unless
69 * Returns buffer address, or NULL on error
405 char* buffer; local
415 buffer = map_file(PACKAGES_LIST_FILE, &buffer_len);
416 if (buffer == NULL)
419 p = buffer;
420 buffer_end = buffer + buffer_len;
506 unmap_file(buffer, buffer_len);
/system/extras/procrank/
H A Dprocrank.c49 char buffer[1024]; local
59 const int len = read(fd, buffer, sizeof(buffer)-1);
66 buffer[len] = 0;
88 char* p = buffer;
300 * Get the process name for a given PID. Inserts the process name into buffer
301 * buf of length len. The size of the buffer must be greater than zero to get
304 * Note that fgets(3) only declares length as an int, so our buffer size is
/system/extras/tests/sdcard/
H A Dsdcard_perf_test.cpp161 char buffer[kMinKernelVersionBufferSize] = {0, }; local
162 if (kernelVersion(buffer, sizeof(buffer)) > 0)
164 printf("# Kernel: %s", buffer);
187 char buffer[kMinSchedFeaturesBufferSize] = {0, }; local
188 if (schedFeatures(buffer, sizeof(buffer)) > 0)
190 printf("# Sched features: %s", buffer);
286 // @param chunk buffer large enough where the chunk read are written.

Completed in 1849 milliseconds

123