Searched refs:buffer (Results 26 - 50 of 87) sorted by path

1234

/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/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/libcutils/
H A DAndroid.mk31 buffer.c \
H A Dbuffer.c17 #define LOG_TAG "buffer"
24 #include "buffer.h"
28 Buffer* buffer = malloc(sizeof(Buffer)); local
29 if (buffer == NULL) {
32 buffer->capacity = capacity;
33 buffer->expected = 0;
34 buffer->data = malloc(capacity);
35 if (buffer->data == NULL) {
36 free(buffer);
39 return buffer;
42 bufferFree(Buffer* buffer) argument
48 Buffer* buffer = malloc(sizeof(Buffer)); local
60 bufferPrepareForRead(Buffer* buffer, size_t expected) argument
77 bufferRead(Buffer* buffer, int fd) argument
92 bufferPrepareForWrite(Buffer* buffer) argument
96 bufferWrite(Buffer* buffer, int fd) argument
[all...]
H A Dbuffer.h18 * Byte buffer utilities.
31 * Byte buffer of known size. Keeps track of how much data has been read
32 * into or written out of the buffer.
46 /** Actual # of bytes in the buffer. */
49 /** Amount of memory allocated for this buffer. */
54 * Returns true if all data has been read into the buffer.
56 #define bufferReadComplete(buffer) (buffer->expected == buffer->size)
59 * Returns true if the buffer ha
[all...]
H A Ddebugger.c75 char buffer[4096]; local
77 while ((n = TEMP_FAILURE_RETRY(read(s, buffer, sizeof(buffer)))) > 0) {
78 if (TEMP_FAILURE_RETRY(write(fd, buffer, n)) != n) {
H A Dmq.c37 #include "buffer.h"
278 /** Sets up the buffer for the outgoing header. */
448 * buffer is filled. Returns true when the buffer is empty.
462 Buffer* buffer = peerProxy->currentPacket->bytes; local
463 if (peerProxyWriteFromBuffer(peerProxy, buffer)) {
940 * buffer is filled. Returns true when the buffer is full.
H A Drecord_stream.c37 unsigned char *buffer; member in struct:RecordStream
55 ret->buffer = (unsigned char *)malloc (maxRecordLen + HEADER_SIZE);
57 ret->unconsumed = ret->buffer;
58 ret->read_end = ret->buffer;
59 ret->buffer_end = ret->buffer + maxRecordLen + HEADER_SIZE;
67 free(rs->buffer);
72 /* returns NULL; if there isn't a full record in the buffer */
102 /* one full line in the buffer */
134 /* is there one record already in the buffer? */
142 // if the buffer i
[all...]
H A Duevent.c32 ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length) argument
35 return uevent_kernel_multicast_uid_recv(socket, buffer, length, &user);
47 ssize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, argument
50 struct iovec iov = { buffer, length };
91 bzero(buffer, length);
/system/core/libdiskconfig/
H A Ddiskutils.c37 uint8_t buffer[2048]; local
62 if ((nr_bytes = read(src_fd, buffer, sizeof(buffer))) < 0) {
83 if ((tmp = write(dst_fd, buffer, nr_bytes)) < 0) {
/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/libpixelflinger/
H A DAndroid.mk29 buffer.cpp
/system/core/libpixelflinger/tinyutils/
H A DVectorImpl.cpp224 void* buffer = editArrayImpl();
225 if (buffer)
226 return reinterpret_cast<char*>(buffer) + index*mItemSize;
236 const void* buffer = arrayImpl();
237 if (buffer)
238 return reinterpret_cast<const char*>(buffer) + index*mItemSize;
499 const void* buffer = vector.arrayImpl();
503 ssize_t err = add( reinterpret_cast<const char*>(buffer) + i*is );
/system/core/libsysutils/src/
H A DFrameworkClient.cpp34 char *buffer = (char *) alloca(bufflen); local
35 if (!buffer) {
39 snprintf(buffer, bufflen, "%s%s", msg, data);
40 return sendMsg(buffer);
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/libusbhost/
H A Dusbhost.c392 __u16 buffer[128]; local
408 memset(buffer, 0, sizeof(buffer));
412 (USB_DT_STRING << 8) | id, languages[i], buffer, sizeof(buffer), 0);
418 string[i - 1] = buffer[i];
505 void* buffer,
521 ctrl.data = buffer;
528 void* buffer,
541 ctrl.data = buffer;
500 usb_device_control_transfer(struct usb_device *device, int requestType, int request, int value, int index, void* buffer, int length, unsigned int timeout) argument
526 usb_device_bulk_transfer(struct usb_device *device, int endpoint, void* buffer, int length, unsigned int timeout) argument
[all...]
/system/core/logwrapper/
H A Dlogwrapper.c50 char buffer[4096]; local
59 while ((sz = read(parent_read, &buffer[b], sizeof(buffer) - 1 - b)) > 0) {
64 if (buffer[b] == '\r') {
65 buffer[b] = '\0';
66 } else if (buffer[b] == '\n') {
67 buffer[b] = '\0';
68 ALOG(LOG_INFO, btag, "%s", &buffer[a]);
73 if (a == 0 && b == sizeof(buffer) - 1) {
74 // buffer i
[all...]
/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/core/sdcard/
H A Dsdcard.c132 /* To save memory, we never use the contents of the request buffer and the read
133 * buffer at the same time. This allows us to share the underlying storage. */
204 /* Gets the absolute path to a node into the provided buffer.
207 * or returns -1 if the path is too long for the provided buffer.
231 * Performs a case-insensitive search for the file and sets the buffer to the path
233 * the buffer to the path that the file would have, assuming the name were case-sensitive.
236 * or returns NULL if the path is too long for the provided buffer.
844 /* Don't access any other fields of hdr or req beyond this point, the read buffer
845 * overlaps the request buffer and will clobber data in the request. This
863 const void* buffer)
861 handle_write(struct fuse* fuse, struct fuse_handler* handler, const struct fuse_in_header* hdr, const struct fuse_write_in* req, const void* buffer) argument
980 char buffer[8192]; local
1103 const void* buffer = (const __u8*)data + sizeof(*req); local
[all...]
/system/core/toolbox/
H A Ddmesg.c13 char buffer[KLOG_BUF_LEN + 1]; local
14 char *p = buffer;
24 n = klogctl(op, buffer, KLOG_BUF_LEN);
29 buffer[n] = '\0';
H A Dinsmod.c18 void *buffer = NULL; local
31 buffer = malloc(size);
32 if (!buffer)
35 /* slurp it into our buffer */
36 ret = read(fd, buffer, size);
45 return buffer;
92 /* free the file buffer */
H A Dlog.c94 char buffer[4096]; local
130 buffer[0] = '\0';
133 strncat(buffer, argv[i], sizeof(buffer)-1);
134 strncat(buffer, " ", sizeof(buffer)-1);
137 if(buffer[0] == 0) {
141 __android_log_print(priority, tag, "%s", buffer);
H A Dlsof.c102 char buffer[PATH_MAX + 100]; local
/system/core/toolbox/grep/
H A Dfile.c70 static unsigned char buffer[MAXBUFSIZ]; variable
83 bufpos = buffer;
88 nr = gzread(gzbufdesc, buffer, MAXBUFSIZ);
90 nr = BZ2_bzRead(&bzerr, bzbufdesc, buffer, MAXBUFSIZ);
109 nr = read(f->fd, buffer, MAXBUFSIZ);
117 nr = read(f->fd, buffer, MAXBUFSIZ);
147 /* Fill the buffer, if necessary */
157 /* Look for a newline in the remaining part of the buffer */
168 /* We have to copy the current buffered data to the line buffer */
215 /* Fill read buffer, als
[all...]

Completed in 132 milliseconds

1234