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

123

/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 Dservices.c439 static void connect_device(char* host, char* buffer, int buffer_size) argument
450 snprintf(buffer, buffer_size, "bad host name %s", host);
456 snprintf(buffer, buffer_size, "bad port number %s", portstr);
467 snprintf(buffer, buffer_size, "unable to connect to %s:%d", host, port);
478 snprintf(buffer, buffer_size, "already connected to %s", serial);
480 snprintf(buffer, buffer_size, "connected to %s", serial);
484 void connect_emulator(char* port_spec, char* buffer, int buffer_size) argument
488 snprintf(buffer, buffer_size,
500 snprintf(buffer, buffer_size,
515 snprintf(buffer, buffer_siz
[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...]
/system/core/fastbootd/
H A Dprotocol.c108 char *buffer, size_t len)
110 return transport_handle_write(phandle->transport_handle, buffer, len);
151 void protocol_handle_command(struct protocol_handle *phandle, char *buffer) argument
153 D(INFO,"fastboot: %s\n", buffer);
158 if (memcmp(buffer, cmd->prefix, cmd->prefix_len))
161 cmd->execute(phandle, buffer + cmd->prefix_len);
107 protocol_handle_write(struct protocol_handle *phandle, char *buffer, size_t len) 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/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.cpp48 char buffer[CMD_BUF_SIZE]; local
51 len = TEMP_FAILURE_RETRY(read(c->getSocket(), buffer, sizeof(buffer)));
57 if(buffer[len-1] != '\0')
64 if (buffer[i] == '\0') {
66 dispatchCommand(c, buffer + offset);
H A DNetlinkEvent.cpp177 bool NetlinkEvent::parseBinaryNetlinkMessage(char *buffer, int size) { argument
180 for (nh = (struct nlmsghdr *) buffer;
205 char buffer[16 + IFNAMSIZ]; local
206 snprintf(buffer, sizeof(buffer), "INTERFACE=%s",
208 mParams[0] = strdup(buffer);
280 bool NetlinkEvent::parseAsciiNetlinkMessage(char *buffer, int size) { argument
281 const char *s = buffer;
290 /* Ensure the buffer is zero-terminated, the code below depends on this */
291 buffer[siz
327 decode(char *buffer, int size, int format) argument
[all...]
/system/core/libutils/
H A DTokenizer.cpp38 Tokenizer::Tokenizer(const String8& filename, FileMap* fileMap, char* buffer, argument
41 mBuffer(buffer), mOwnBuffer(ownBuffer), mLength(length),
42 mCurrent(buffer), mLineNumber(1) {
72 char* buffer; local
75 buffer = static_cast<char*>(fileMap->getDataPtr());
80 // Fall back to reading into a buffer since we can't mmap files in sysfs.
83 buffer = new char[length];
85 ssize_t nrd = read(fd, buffer, length);
89 delete[] buffer;
90 buffer
[all...]
H A DBlobCache.cpp148 // The key was found. Return the value if the caller's buffer is large
153 ALOGV("get: copying %d bytes to caller's buffer", valueBlobSize);
156 ALOGV("get: caller's buffer is too small for value: %d (needs %d)",
179 status_t BlobCache::flatten(void* buffer, size_t size) const { argument
185 Header* header = reinterpret_cast<Header*>(buffer);
192 uint8_t* byteBuffer = reinterpret_cast<uint8_t*>(buffer);
221 status_t BlobCache::unflatten(void const* buffer, size_t size) { argument
230 const Header* header = reinterpret_cast<const Header*>(buffer);
242 const uint8_t* byteBuffer = reinterpret_cast<const uint8_t*>(buffer);
/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.c242 char buffer[100]; local
251 length = fread(buffer, 1, 100, f);
253 fwrite(buffer, 1, length, stdout);
/system/extras/libc_test/
H A Dmain.cpp100 void setFencepost(uint8_t *buffer) { argument
102 buffer[i] = 0xde;
103 buffer[i+1] = 0xad;
107 bool verifyFencepost(uint8_t *buffer) { argument
109 if (buffer[i] != 0xde || buffer[i+1] != 0xad) {
111 if (buffer[i] == 0xde) {
118 i, expected_value, buffer[i]);
640 // memcpy is not so broken that it will write in to the source buffer.
818 // Set the buffer t
[all...]
/system/vold/
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.cpp59 char buffer[4096]; local
60 char *p = buffer;
62 memset(buffer, 0, sizeof(buffer));
69 if (((p - buffer) + len) < (sizeof(buffer)-1)) {
83 SLOGD("%s", buffer);
/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/fs_mgr/
H A Dfs_mgr_verity.c278 char *buffer = (char*) io; local
287 struct dm_target_spec *tgt = (struct dm_target_spec *) &buffer[sizeof(struct dm_ioctl)];
297 verity_params = buffer + sizeof(struct dm_ioctl) + sizeof(struct dm_target_spec);
305 tgt->next = verity_params - buffer;
345 char buffer[DM_BUF_SIZE]; local
346 struct dm_ioctl *io = (struct dm_ioctl *) buffer;
/system/core/libcorkscrew/
H A Dbacktrace.c315 const backtrace_symbol_t* symbol, char* buffer, size_t bufferSize) {
322 snprintf(buffer, bufferSize, "#%02u pc %08x %.*s (%.*s+%u)",
326 snprintf(buffer, bufferSize, "#%02u pc %08x %.*s (%.*s)",
331 snprintf(buffer, bufferSize, "#%02u pc %08x %.*s",
314 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
73 * Returns buffer address, or NULL on error
426 char* buffer; local
437 buffer = map_file(PACKAGES_LIST_FILE, &buffer_len);
438 if (buffer == NULL)
441 p = buffer;
442 buffer_end = buffer + buffer_len;
540 unmap_file(buffer, buffer_len);
/system/extras/memtrack/
H A Dmemtrack.cpp40 FileData::FileData(char *filename, char *buffer, size_t buffer_len) argument
41 : data_(buffer), max_(buffer_len), cur_idx_(0), len_(0),
65 // Copy the leftover to the front of the buffer.
/system/extras/procrank/
H A Dprocrank.c51 char buffer[1024]; local
61 const int len = read(fd, buffer, sizeof(buffer)-1);
68 buffer[len] = 0;
90 char* p = buffer;
355 * Get the process name for a given PID. Inserts the process name into buffer
356 * buf of length len. The size of the buffer must be greater than zero to get
359 * 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 2773 milliseconds

123