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

1234

/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 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)

Completed in 127 milliseconds

1234