/system/core/libsparse/ |
H A D | sparse.c | 76 int fd, int64_t file_offset, unsigned int len, unsigned int block) 78 return backed_block_add_fd(s->backed_block_list, fd, file_offset, 161 int sparse_file_write(struct sparse_file *s, int fd, bool gz, bool sparse, argument 169 out = output_file_open_fd(fd, s->block_size, s->len, gz, sparse, chunks, crc); 75 sparse_file_add_fd(struct sparse_file *s, int fd, int64_t file_offset, unsigned int len, unsigned int block) argument
|
H A D | sparse_read.c | 102 int fd, int64_t offset, unsigned int blocks, unsigned int block, 117 ret = sparse_file_add_fd(s, fd, offset, len, block); 125 ret = read_all(fd, copybuf, chunk); 133 lseek64(fd, len, SEEK_CUR); 140 int fd, unsigned int blocks, unsigned int block, uint32_t *crc32) 153 ret = read_all(fd, &fill_val, sizeof(fill_val)); 181 int fd __unused, unsigned int blocks, 202 static int process_crc32_chunk(int fd, unsigned int chunk_size, uint32_t *crc32) argument 211 ret = read_all(fd, &file_crc32, sizeof(file_crc32)); 223 static int process_chunk(struct sparse_file *s, int fd, off64_ argument 101 process_raw_chunk(struct sparse_file *s, unsigned int chunk_size, int fd, int64_t offset, unsigned int blocks, unsigned int block, uint32_t *crc32) argument 139 process_fill_chunk(struct sparse_file *s, unsigned int chunk_size, int fd, unsigned int blocks, unsigned int block, uint32_t *crc32) argument 275 sparse_file_read_sparse(struct sparse_file *s, int fd, bool crc) argument 357 sparse_file_read_normal(struct sparse_file *s, int fd) argument 409 sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc) argument 422 sparse_file_import(int fd, bool verbose, bool crc) argument 478 sparse_file_import_auto(int fd, bool crc, bool verbose) argument [all...] |
/system/core/libsync/tests/ |
H A D | sync_test.cpp | 19 // Handle more than 64 fd's simultaneously, i.e. fix sync_fence_info's 4k limit. 34 int fd = sw_sync_timeline_create(); variable 35 if (fd == -1) 38 m_fd = fd; 83 void setFd(int fd) { argument 84 m_fd = fd; 122 int fd = dup(fence.getFd()); variable 123 if (fd == -1) 125 setFd(fd); 134 int fd variable 143 int fd = sync_merge(name ? name : autoName.c_str(), a.getFd(), b.getFd()); variable [all...] |
/system/core/libutils/ |
H A D | ProcessCallStack.cpp | 238 void ProcessCallStack::dump(int fd, int indent, const char* prefix) const { argument 245 FdPrinter printer(fd, static_cast<unsigned int>(indent), prefix);
|
/system/core/libutils/tests/ |
H A D | Looper_test.cpp | 56 void setCallback(const sp<Looper>& looper, int fd, int events) { argument 57 looper->addFd(fd, 0, events, staticHandler, this); 63 virtual int handler(int fd, int events) = 0; 66 static int staticHandler(int fd, int events, void* data) { argument 67 return static_cast<CallbackHandler*>(data)->handler(fd, events); 76 int fd; member in class:android::StubCallbackHandler 80 callbackCount(0), fd(-1), events(-1) { 84 virtual int handler(int fd, int events) { argument 86 this->fd = fd; 345 int fd; local [all...] |
/system/core/libziparchive/ |
H A D | zip_archive_test.cc | 96 int fd = open((test_data_dir + "/" + kValidZip).c_str(), O_RDONLY | O_BINARY); local 97 ASSERT_NE(-1, fd); 99 ASSERT_EQ(0, OpenArchiveFd(fd, "OpenWithAssumeFdOwnership", &handle)); 101 ASSERT_EQ(-1, lseek(fd, 0, SEEK_SET)); 106 int fd = open((test_data_dir + "/" + kValidZip).c_str(), O_RDONLY | O_BINARY); local 107 ASSERT_NE(-1, fd); 109 ASSERT_EQ(0, OpenArchiveFd(fd, "OpenWithAssumeFdOwnership", &handle, false)); 111 ASSERT_EQ(0, lseek(fd, 0, SEEK_SET)); 112 close(fd); 380 ASSERT_NE(-1, tmp_file.fd); [all...] |
/system/core/logd/ |
H A D | LogAudit.cpp | 272 int fd = audit_open(); local 273 if (fd < 0) { 274 return fd; 276 if (audit_setup(fd, getpid()) < 0) { 277 audit_close(fd); 278 fd = -1; 280 return fd;
|
H A D | LogStatistics.cpp | 46 int fd = open(buffer, O_RDONLY); local 47 if (fd >= 0) { 48 ssize_t ret = read(fd, buffer, sizeof(buffer)); 56 close(fd);
|
/system/core/run-as/ |
H A D | package.c | 82 int fd, ret, old_errno; local 101 fd = TEMP_FAILURE_RETRY(open(filename, O_RDONLY)); 102 if (fd < 0) { 112 ret = TEMP_FAILURE_RETRY(fstat(fd, &st)); 135 address = mmap(NULL, length, PROT_READ, MAP_PRIVATE, fd, 0); 148 close(fd);
|
/system/core/toolbox/ |
H A D | iftop.c | 104 int ret, nr, fd; local 106 fd = open(PROC_NET_DEV, O_RDONLY); 107 if (fd < 0) { 112 ret = read(fd, buf, sizeof(buf) - 1); 179 ret = close(fd);
|
H A D | ps.c | 71 int fd = open(cmdline, O_RDONLY); local 72 if(fd == 0) { 75 r = read(fd, cmdline, 1023); 76 close(fd); 82 int fd = open(statline, O_RDONLY); local 83 if(fd == 0) return -1; 84 r = read(fd, statline, 1023); 85 close(fd); 162 fd = open(macline, O_RDONLY); 164 if (fd > 208 int fd, r; local [all...] |
/system/core/toolbox/upstream-netbsd/bin/dd/ |
H A D | dd.c | 159 in.fd = STDIN_FILENO; 163 in.fd = ddop_open(in, in.name, O_RDONLY, 0); 164 if (in.fd < 0) 168 /* Ensure in.fd is outside the stdio descriptor range */ 181 out.fd = STDOUT_FILENO; 188 out.fd = ddop_open(out, out.name, O_RDWR | OFLAGS, DEFFILEMODE); 194 if (out.fd < 0) { 195 out.fd = ddop_open(out, out.name, O_WRONLY | OFLAGS, 199 if (out.fd < 0) { 204 /* Ensure out.fd i 310 int fd = io->fd; local [all...] |
/system/core/toolbox/upstream-netbsd/usr.bin/grep/ |
H A D | grep.h | 85 int fd; member in struct:file
|
/system/extras/libfec/ |
H A D | fec_private.h | 101 int fd; member in struct:fec_handle
|
/system/extras/libpagemap/ |
H A D | pm_process.c | 183 int fd; local 214 fd = open(filename, O_WRONLY); 215 if (fd < 0) 218 write(fd, "1\n", strlen("1\n")); 220 close(fd);
|
/system/extras/memtrack/ |
H A D | memtrack.cpp | 132 int fd = open(proc_file_, O_RDONLY); local 133 if (fd < 0) { 137 ssize_t bytes = read(fd, cmd_name_, sizeof(cmd_name_)); 138 close(fd);
|
/system/extras/perfprofd/quipper/original-kernel-headers/tools/perf/ |
H A D | perf.h | 156 int fd, int group_fd, unsigned long flags); 163 int fd; local 165 fd = syscall(__NR_perf_event_open, attr, pid, cpu, 169 test_attr__open(attr, pid, cpu, fd, group_fd, flags); 171 return fd;
|
/system/extras/puncture_fs/ |
H A D | puncture_fs.c | 77 int fd; local 84 fd = open(file_path, O_WRONLY | O_CREAT | O_SYNC, 0777); 85 if (fd < 0) { 95 if (write(fd, base, base_length) < 0) { 105 if (write(fd, base, size - length) < 0) { 114 if (close(fd) < 0) {
|
/system/extras/simpleperf/ |
H A D | utils.cpp | 60 int fd = TEMP_FAILURE_RETRY(open(filename.c_str(), O_RDONLY | O_BINARY)); local 61 return FileHelper(fd); 65 int fd = TEMP_FAILURE_RETRY(open(filename.c_str(), O_WRONLY | O_BINARY | O_CREAT, 0644)); local 66 return FileHelper(fd); 75 ArchiveHelper::ArchiveHelper(int fd, const std::string& debug_filename) : valid_(false) { argument 76 int rc = OpenArchiveFd(fd, "", &handle_, false);
|
/system/extras/sound/ |
H A D | playwav.c | 138 int fd, unsigned count) 145 if (read(fd, next, count) != count) { 157 int fd; local 158 fd = open(fn, O_RDONLY); 159 if (fd < 0) { 163 if (read(fd, &hdr, sizeof(hdr)) != sizeof(hdr)) { 188 fd, hdr.data_sz); 199 int fd, afd; local 217 fd = open(fn, O_CREAT | O_RDWR, 0666); 218 if (fd < 137 play_file(unsigned rate, unsigned channels, int fd, unsigned count) argument 301 int fd, afd; local [all...] |
/system/extras/tests/directiotest/ |
H A D | directiotest.c | 71 static ssize_t do_read(int fd, void *buf, off64_t start, size_t count) argument 76 lseek64(fd, start, SEEK_SET); 79 ret = read(fd, (char *)buf + bytes_read, count - bytes_read); 93 static ssize_t do_write(int fd, const void *buf, off64_t start, size_t count) argument 98 lseek64(fd, start, SEEK_SET); 101 ret = write(fd, (char *)buf + bytes_out, count - bytes_out); 174 int fd; local 188 fd = open(path, O_RDWR | O_DIRECT | O_LARGEFILE); 189 if (fd == -1) { 193 if (fstat(fd, [all...] |
/system/extras/tests/framebuffer/ |
H A D | fb_test.c | 54 int fd; local 58 fd = open("/dev/graphics/fb0", O_RDWR); 59 if (fd < 0) { 61 if ((fd = open("/dev/fb0", O_RDWR)) < 0) { 67 if(ioctl(fd, FBIOGET_VSCREENINFO, &vi) < 0) { 75 if(ioctl(fd, FBIOPUT_VSCREENINFO, &vi) < 0) { 81 if(ioctl(fd, FBIOGET_FSCREENINFO, &fi) < 0) { 88 bits = mmap(0, fi.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 111 return fd; 141 int fd local [all...] |
/system/extras/tests/iptables/qtaguid/ |
H A D | socketTag.cpp | 42 SockInfo() : fd(-1), addr(NULL) {}; 45 int fd; member in class:android::SockInfo 102 fd = socket(AF_INET, SOCK_STREAM, 0); 103 if (fd < 0) { 107 if (doCtrlCommand("t %d %" PRIu64, fd, tag) < 0) { 109 close(fd); 114 close(fd); 117 if (doCtrlCommand("u %d", fd) < 0) { 119 close(fd); 268 EXPECT_GE(doCtrlCommand("t %d %" PRIu64 " %u", sock0.fd, ta [all...] |
/system/extras/tests/sdcard/ |
H A D | sdcard_perf_test.cpp | 88 #define FADVISE(fd, off, len, advice) (void)0 297 int fd = open(filename, O_RDONLY); local 300 if (fd < 0) 305 FADVISE(fd, 0, 0, testCase->fadvise()); 327 ssize_t s = read(fd, dest, chunk_size); 331 close(fd); 339 close(fd); 376 int fd = open(filename, O_RDWR | O_CREAT, S_IRWXU); local 385 ssize_t written = write(fd, chunk, chunk_size); 393 close(fd); 423 int fd = open(filename, O_RDWR | O_CREAT, S_IRWXU); // no O_TRUNC, see header comment local 542 int fd = open(filename, O_RDWR | O_CREAT, S_IRWXU); local 560 int fd = open(filename, O_RDWR | O_CREAT, S_IRWXU); local [all...] |
/system/extras/verity/ |
H A D | build_verity_tree.cpp | 262 int fd = open(data_filename, O_RDONLY); local 263 if (fd < 0) { 269 file = sparse_file_import(fd, false, false); 271 file = sparse_file_import_auto(fd, false, verbose); 330 close(fd); 354 fd = open(verity_filename, O_WRONLY|O_CREAT, 0666); 355 if (fd < 0) { 358 if (!android::base::WriteFully(fd, verity_tree, verity_blocks * block_size)) { 361 close(fd);
|