Searched refs:buffer (Results 1 - 25 of 87) sorted by last modified time

1234

/system/vold/
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);
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 DDevmapper.h28 unsigned int numSectors, char *buffer, size_t len);
30 static int lookupActive(const char *name, char *buffer, size_t len);
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 DLoop.h29 static int lookupActive(const char *id, char *buffer, size_t len);
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 DProcess.h29 static void getProcessName(int pid, char *buffer, size_t max);
H A DVolumeManager.cpp79 char *VolumeManager::asecHash(const char *id, char *buffer, size_t len) { argument
84 if (buffer == NULL) {
85 SLOGE("Destination buffer is NULL");
89 SLOGE("Source buffer is NULL");
93 SLOGE("Target hash buffer size < %d bytes (%d)",
101 char *p = buffer;
108 return buffer;
159 char *buffer; local
160 asprintf(&buffer, "%s %s %d",
163 cli->sendMsg(ResponseCode::VolumeListResult, buffer, fals
204 getAsecMountPath(const char *id, char *buffer, int maxlen) argument
222 getAsecFilesystemPath(const char *id, char *buffer, int maxlen) argument
[all...]
H A DVolumeManager.h111 int getAsecMountPath(const char *id, char *buffer, int maxlen);
112 int getAsecFilesystemPath(const char *id, char *buffer, int maxlen);
118 int getObbMountPath(const char *id, char *buffer, int maxlen);
136 static char *asecHash(const char *id, char *buffer, size_t len);
H A Dcryptfs.c383 char buffer[DM_CRYPT_BUF_SIZE]; local
398 io = (struct dm_ioctl *) buffer;
416 tgt = (struct dm_target_spec *) &buffer[sizeof(struct dm_ioctl)];
425 crypt_params = buffer + sizeof(struct dm_ioctl) + sizeof(struct dm_target_spec);
431 tgt->next = crypt_params - buffer;
467 char buffer[DM_CRYPT_BUF_SIZE]; local
476 io = (struct dm_ioctl *) buffer;
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 Dvdc.c85 char *buffer = malloc(4096); local
103 free(buffer);
110 memset(buffer, 0, 4096);
111 if ((rc = read(sock, buffer, 4096)) <= 0) {
116 free(buffer);
126 if (buffer[i] == '\0') {
130 strncpy(tmp, buffer + offset, 3);
134 printf("%s\n", buffer + offset);
144 free(buffer);
/system/vold/tests/
H A DVolumeManager_test.cpp38 char buffer[MD5_ASCII_LENGTH_PLUS_NULL]; local
39 char* dst = reinterpret_cast<char*>(&buffer);
44 EXPECT_TRUE(VolumeManager::asecHash(exp1, (char*)NULL, sizeof(buffer)) == NULL && errno == ESPIPE)
45 << "Should return NULL and set errno to ESPIPE when destination buffer is NULL";
47 << "Should return NULL and set errno to ESPIPE when destination buffer length is 0";
48 EXPECT_TRUE(VolumeManager::asecHash((const char*)NULL, dst, sizeof(buffer)) == NULL && errno == ESPIPE)
49 << "Should return NULL and set errno to ESPIPE when source buffer is NULL";
51 EXPECT_FALSE(VolumeManager::asecHash(src1, dst, sizeof(buffer)) == NULL)
58 EXPECT_FALSE(VolumeManager::asecHash(src2, dst, sizeof(buffer)) == NULL)
/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/bluetooth/brcm_patchram_plus/
H A Dbrcm_patchram_plus.c170 uchar buffer[1024]; variable
569 read_event(int fd, uchar *buffer) argument
575 while ((count = read(fd, &buffer[i], len)) < len) {
581 len = buffer[2];
583 while ((count = read(fd, &buffer[i], len)) < len) {
592 dump(buffer, count);
624 read_event(uart_fd, buffer);
636 read_event(uart_fd, buffer);
639 read(uart_fd, &buffer[0], 2);
646 while (read(hcdfile_fd, &buffer[
[all...]
/system/bluetooth/brfpatch/
H A Dbrfpatch.c77 static void process_line(FILE *file_out, char *buf, char *buffer) { argument
78 FAILIF(strncmp(buf, "Send_", 5) != 0, "Not expecting: %s\n", buffer);
83 FAILIF(advance(&buf), "Could not find opcode in: %s\n", buffer); local
85 "Could not find opcode in: %s\n", buffer);
97 "Too much data: %s\n", buffer);
99 "Error parsing (%d): %s\n", __LINE__, buffer);
108 FAILIF(*buf != 'x', "Error parsing: %s\n", buffer);
120 "Error parsing (%d): %s\n", __LINE__, buffer);
126 "Error parsing (%d): %s\n", __LINE__, buffer);
132 "Error parsing (%d): %s\n", __LINE__, buffer);
177 char buffer[1024]; local
[all...]
/system/core/adb/
H A Dadb.c1150 ** AID_GRAPHICS to access the frame buffer
1237 void connect_device(char* host, char* buffer, int buffer_size) argument
1247 snprintf(buffer, buffer_size, "bad host name %s", host);
1253 snprintf(buffer, buffer_size, "bad port number %s", portstr);
1262 snprintf(buffer, buffer_size, "already connected to %s", serial);
1268 snprintf(buffer, buffer_size, "unable to connect to %s:%d", host, port);
1276 snprintf(buffer, buffer_size, "connected to %s", serial);
1279 void connect_emulator(char* port_spec, char* buffer, int buffer_size) argument
1283 snprintf(buffer, buffer_size,
1295 snprintf(buffer, buffer_siz
1381 char buffer[4096]; local
1397 char buffer[4096]; local
1412 char buffer[4096]; local
[all...]
H A Dcommandline.c359 static void format_host_command(char* buffer, size_t buflen, const char* command, transport_type ttype, const char* serial) argument
362 snprintf(buffer, buflen, "host-serial:%s:%s", serial, command);
370 snprintf(buffer, buflen, "%s:%s", prefix, command);
H A Dfile_sync_client.c337 fprintf(stderr, "could not allocate buffer for '%s'\n",
446 char *buffer = send_buffer.data; local
493 if(readx(fd, buffer, len)) {
498 if(writex(lfd, buffer, len)) {
517 if(readx(fd, buffer, len)) {
520 buffer[len] = 0;
522 memcpy(buffer, &id, 4);
523 buffer[4] = 0;
524 // strcpy(buffer,"unknown reason");
526 fprintf(stderr,"failed to copy '%s' to '%s': %s\n", rpath, lpath, buffer);
[all...]
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 Dremount_service.c104 char buffer[200]; local
105 snprintf(buffer, sizeof(buffer), "remount failed: %s\n", strerror(errno));
106 write_string(fd, buffer);
H A Dsysdeps_win32.c808 * each buffer is implemented as two regions:
813 * an empty buffer has: a_start = a_end = b_end = 0
819 * the buffer is full when b_end == a_start && a_end == BUFFER_SIZE
868 HANDLE evt_write; /* event signaled when one can write to a buffer */
870 HANDLE evt_read; /* event signaled when one can read from a buffer */
877 bip_buffer_init( BipBuffer buffer )
879 D( "bit_buffer_init %p\n", buffer );
880 buffer->a_start = 0;
881 buffer->a_end = 0;
882 buffer
[all...]
H A Dtest_track_devices.c57 char buffer[1024]; local
71 len = snprintf( buffer, sizeof buffer, "%04x%s", strlen(request), request );
72 if (unix_write(s, buffer, len) < 0)
76 if (unix_read(s, buffer, 4) != 4)
79 printf( "server answer: %.*s\n", 4, buffer );
91 if (unix_read(s, buffer, len) != len)
94 printf( "received header %.*s (%d bytes):\n%.*s", 4, head, len, len, buffer );
H A Dtest_track_jdwp.c57 char buffer[1024]; local
71 len = snprintf( buffer, sizeof buffer, "%04x%s", strlen(request), request );
72 if (unix_write(s, buffer, len) < 0)
76 if (unix_read(s, buffer, 4) != 4)
79 printf( "server answer: %.*s\n", 4, buffer );
91 if (unix_read(s, buffer, len) != len)
94 printf( "received header %.*s (%d bytes):\n%.*s", 4, head, len, len, buffer );

Completed in 312 milliseconds

1234