Home
last modified time | relevance | path

Searched refs:device_fd (Results 1 – 11 of 11) sorted by relevance

/system/apex/apexd/
Dapexd_loop.h33 unique_fd device_fd; member
38 : device_fd(std::move(fd)), name(name) {} in LoopbackDeviceUniqueFd()
41 : device_fd(std::move(fd.device_fd)), name(std::move(fd.name)) {} in LoopbackDeviceUniqueFd()
44 device_fd = std::move(other.device_fd);
53 void CloseGood() { device_fd.reset(-1); } in CloseGood()
55 int Get() { return device_fd.get(); } in Get()
Dapexd_loop.cpp81 if (device_fd.get() != -1) { in MaybeCloseBad()
83 if (ioctl(device_fd.get(), LOOP_CLR_FD) == -1) { in MaybeCloseBad()
161 Result<void> ConfigureLoopDevice(const int device_fd, const std::string& target, in ConfigureLoopDevice() argument
175 if (ioctl(device_fd, LOOP_CONFIGURE, &config) == -1 && errno == EBADF) { in ConfigureLoopDevice()
224 if (ioctl(device_fd, LOOP_CONFIGURE, &config) == -1) { in ConfigureLoopDevice()
230 if (ioctl(device_fd, LOOP_SET_FD, target_fd.get()) == -1) { in ConfigureLoopDevice()
234 if (ioctl(device_fd, LOOP_SET_STATUS64, &li) == -1) { in ConfigureLoopDevice()
238 if (ioctl(device_fd, BLKFLSBUF, 0) == -1) { in ConfigureLoopDevice()
262 if (ioctl(device_fd, LOOP_SET_BLOCK_SIZE, 4096) == -1) { in ConfigureLoopDevice()
323 CHECK_NE(loop_device->device_fd.get(), -1); in CreateLoopDevice()
[all …]
/system/extras/tests/uevents/
Duevents.c24 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/
DLoop.cpp85 unique_fd device_fd(open(out_device.c_str(), O_RDWR | O_CLOEXEC)); in create() local
86 if (device_fd.get() == -1) { in create()
91 if (ioctl(device_fd.get(), LOOP_SET_FD, target_fd.get()) == -1) { in create()
99 if (ioctl(device_fd.get(), LOOP_SET_STATUS64, &li) == -1) { in create()
108 int device_fd; in destroyByDevice() local
110 device_fd = open(loopDevice, O_RDONLY | O_CLOEXEC); in destroyByDevice()
111 if (device_fd < 0) { in destroyByDevice()
116 if (ioctl(device_fd, LOOP_CLR_FD, 0) < 0) { in destroyByDevice()
118 close(device_fd); in destroyByDevice()
122 close(device_fd); in destroyByDevice()
DAppFuseUtil.cpp51 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()
DCheckpoint.cpp553 void restoreSector(int device_fd, Used_Sectors& used_sectors, std::vector<char>& ls_buffer, in restoreSector() argument
560 fsync(device_fd); in restoreSector()
561 lseek64(device_fd, 0, SEEK_SET); in restoreSector()
564 write(device_fd, &ls_buffer[0], ls.block_size); in restoreSector()
565 fsync(device_fd); in restoreSector()
579 lseek64(device_fd, le->source * kSectorSize, SEEK_SET); in restoreSector()
580 write(device_fd, &buffer[0], le->size); in restoreSector()
583 fsync(device_fd); in restoreSector()
589 std::vector<char> relocatedRead(int device_fd, Relocations const& relocations, bool validating, in relocatedRead() argument
593 lseek64(device_fd, sector * kSectorSize, SEEK_SET); in relocatedRead()
[all …]
DAppFuseUtil.h27 int MountAppFuse(uid_t uid, int mountId, android::base::unique_fd* device_fd);
DVolumeManager.h198 int mountAppFuse(uid_t uid, int mountId, android::base::unique_fd* device_fd);
DVolumeManager.cpp1162 int VolumeManager::mountAppFuse(uid_t uid, int mountId, unique_fd* device_fd) { in mountAppFuse() argument
1163 return android::vold::MountAppFuse(uid, mountId, device_fd); in mountAppFuse()
/system/core/fs_mgr/
Dfs_mgr.cpp2074 unique_fd device_fd(TEMP_FAILURE_RETRY(open(device.c_str(), O_RDWR | O_CLOEXEC))); in PrepareZramBackingDevice() local
2075 if (device_fd.get() == -1) { in PrepareZramBackingDevice()
2079 if (!LoopControl::EnableDirectIo(device_fd.get())) { in PrepareZramBackingDevice()
/system/unwinding/libbacktrace/
Dbacktrace_test.cpp1586 android::base::unique_fd device_fd(open("/dev/zero", O_RDONLY | O_CLOEXEC)); in SetupDeviceMap() local
1588 *device_map = mmap(nullptr, 1024, PROT_READ, MAP_PRIVATE, device_fd, 0); in SetupDeviceMap()