/system/apex/apexd/ |
D | apexd_loop.h | 34 unique_fd device_fd; member 39 : device_fd(std::move(fd)), name(name) {} in LoopbackDeviceUniqueFd() 42 : device_fd(std::move(fd.device_fd)), name(fd.name) {} in LoopbackDeviceUniqueFd() 45 device_fd = std::move(other.device_fd); 54 void CloseGood() { device_fd.reset(-1); } in CloseGood() 56 int get() { return device_fd.get(); } in get()
|
D | apexd_loop.cpp | 59 if (device_fd.get() != -1) { in MaybeCloseBad() 61 if (ioctl(device_fd.get(), LOOP_CLR_FD) == -1) { in MaybeCloseBad() 147 LoopbackDeviceUniqueFd device_fd; in createLoopDevice() local 163 device_fd = LoopbackDeviceUniqueFd(std::move(sysfs_fd), device); in createLoopDevice() 164 CHECK_NE(device_fd.get(), -1); in createLoopDevice() 167 if (ioctl(device_fd.get(), LOOP_SET_FD, target_fd.get()) == -1) { in createLoopDevice() 176 if (ioctl(device_fd.get(), LOOP_SET_STATUS64, &li) == -1) { in createLoopDevice() 180 if (ioctl(device_fd.get(), BLKFLSBUF, 0) == -1) { in createLoopDevice() 205 if (ioctl(device_fd.get(), LOOP_SET_BLOCK_SIZE, 4096) == -1) { in createLoopDevice() 208 if (ioctl(device_fd.get(), LOOP_SET_DIRECT_IO, 1) == -1) { in createLoopDevice() [all …]
|
/system/extras/tests/uevents/ |
D | uevents.c | 24 int device_fd; in main() local 29 device_fd = uevent_open_socket(64*1024, true); in main() 30 if(device_fd < 0) in main() 33 while ((n = uevent_kernel_multicast_recv(device_fd, msg, UEVENT_MSG_LEN)) > 0) { in main()
|
/system/vold/ |
D | Loop.cpp | 77 unique_fd device_fd(open(out_device.c_str(), O_RDWR | O_CLOEXEC)); in create() local 78 if (device_fd.get() == -1) { in create() 83 if (ioctl(device_fd.get(), LOOP_SET_FD, target_fd.get()) == -1) { in create() 91 if (ioctl(device_fd.get(), LOOP_SET_STATUS64, &li) == -1) { in create() 100 int device_fd; in destroyByDevice() local 102 device_fd = open(loopDevice, O_RDONLY | O_CLOEXEC); in destroyByDevice() 103 if (device_fd < 0) { in destroyByDevice() 108 if (ioctl(device_fd, LOOP_CLR_FD, 0) < 0) { in destroyByDevice() 110 close(device_fd); in destroyByDevice() 114 close(device_fd); in destroyByDevice()
|
D | AppFuseUtil.cpp | 51 static android::status_t Mount(int device_fd, const std::string& path) { in Mount() argument 60 device_fd); in Mount() 74 int device_fd) { in RunCommand() argument 81 return Mount(device_fd, path); in RunCommand() 105 int MountAppFuse(uid_t uid, int mountId, android::base::unique_fd* device_fd) { in MountAppFuse() argument 129 device_fd->reset(open("/dev/fuse", O_RDWR)); in MountAppFuse() 130 if (device_fd->get() == -1) { in MountAppFuse() 136 return RunCommand("mount", uid, path, device_fd->get()); in MountAppFuse()
|
D | Checkpoint.cpp | 516 void restoreSector(int device_fd, Used_Sectors& used_sectors, std::vector<char>& ls_buffer, in restoreSector() argument 523 fsync(device_fd); in restoreSector() 524 lseek64(device_fd, 0, SEEK_SET); in restoreSector() 527 write(device_fd, &ls_buffer[0], ls.block_size); in restoreSector() 528 fsync(device_fd); in restoreSector() 542 lseek64(device_fd, le->source * kSectorSize, SEEK_SET); in restoreSector() 543 write(device_fd, &buffer[0], le->size); in restoreSector() 546 fsync(device_fd); in restoreSector() 552 std::vector<char> relocatedRead(int device_fd, Relocations const& relocations, bool validating, in relocatedRead() argument 556 lseek64(device_fd, sector * kSectorSize, SEEK_SET); in relocatedRead() [all …]
|
D | AppFuseUtil.h | 27 int MountAppFuse(uid_t uid, int mountId, android::base::unique_fd* device_fd);
|
D | VolumeManager.h | 130 int mountAppFuse(uid_t uid, int mountId, android::base::unique_fd* device_fd);
|
D | VolumeManager.cpp | 746 int VolumeManager::mountAppFuse(uid_t uid, int mountId, unique_fd* device_fd) { in mountAppFuse() argument 747 return android::vold::MountAppFuse(uid, mountId, device_fd); in mountAppFuse()
|
/system/core/adb/client/ |
D | commandline.cpp | 876 unique_fd device_fd(adb_connect(service, &error)); in adb_sideload_install() local 877 if (device_fd < 0) { in adb_sideload_install() 894 adb_setsockopt(device_fd, SOL_SOCKET, SO_SNDBUF, &opt, sizeof(opt)); in adb_sideload_install() 901 if (!ReadFdExactly(device_fd, buf, 8)) { in adb_sideload_install() 942 if (!WriteFdExactly(device_fd, buf, to_write)) { in adb_sideload_install() 943 adb_status(device_fd, &error); in adb_sideload_install()
|
/system/core/fs_mgr/ |
D | fs_mgr.cpp | 1563 unique_fd device_fd(TEMP_FAILURE_RETRY(open(device.c_str(), O_RDWR | O_CLOEXEC))); in PrepareZramDevice() local 1564 if (device_fd.get() == -1) { in PrepareZramDevice() 1569 if (ioctl(device_fd.get(), LOOP_SET_FD, target_fd.get())) { in PrepareZramDevice() 1575 if (ioctl(device_fd.get(), LOOP_SET_BLOCK_SIZE, 4096)) { in PrepareZramDevice() 1578 if (ioctl(device_fd.get(), LOOP_SET_DIRECT_IO, 1)) { in PrepareZramDevice()
|
/system/core/libbacktrace/ |
D | backtrace_test.cpp | 1570 android::base::unique_fd device_fd(open("/dev/zero", O_RDONLY | O_CLOEXEC)); in SetupDeviceMap() local 1572 *device_map = mmap(nullptr, 1024, PROT_READ, MAP_PRIVATE, device_fd, 0); in SetupDeviceMap()
|