Lines Matching refs:fd
57 int fd; in dumpState() local
58 if ((fd = open("/dev/device-mapper", O_RDWR | O_CLOEXEC)) < 0) { in dumpState()
68 if (ioctl(fd, DM_LIST_DEVICES, io)) { in dumpState()
72 close(fd); in dumpState()
80 close(fd); in dumpState()
91 if (ioctl(fd, DM_DEV_STATUS, io2)) { in dumpState()
113 close(fd); in dumpState()
140 int fd; in lookupActive() local
141 if ((fd = open("/dev/device-mapper", O_RDWR | O_CLOEXEC)) < 0) { in lookupActive()
150 if (ioctl(fd, DM_DEV_STATUS, io)) { in lookupActive()
155 close(fd); in lookupActive()
158 close(fd); in lookupActive()
174 int fd; in create() local
175 if ((fd = open("/dev/device-mapper", O_RDWR | O_CLOEXEC)) < 0) { in create()
186 if (ioctl(fd, DM_DEV_CREATE, io)) { in create()
189 close(fd); in create()
201 if (ioctl(fd, DM_DEV_SET_GEOMETRY, io)) { in create()
204 close(fd); in create()
210 if (ioctl(fd, DM_DEV_STATUS, io)) { in create()
213 close(fd); in create()
241 if (ioctl(fd, DM_TABLE_LOAD, io)) { in create()
244 close(fd); in create()
251 if (ioctl(fd, DM_DEV_SUSPEND, io)) { in create()
254 close(fd); in create()
260 close(fd); in create()
271 int fd; in destroy() local
272 if ((fd = open("/dev/device-mapper", O_RDWR | O_CLOEXEC)) < 0) { in destroy()
283 if (ioctl(fd, DM_DEV_REMOVE, io)) { in destroy()
288 close(fd); in destroy()
293 close(fd); in destroy()