Home | History | Annotate | Download | only in lib

Lines Matching defs:dev_fd

73 	int ctl_fd, dev_fd, rc, i;
112 dev_fd = open(dev_path, O_RDONLY);
114 if (dev_fd < 0)
117 if (ioctl(dev_fd, LOOP_GET_STATUS, &loopinfo) == 0) {
123 close(dev_fd);
127 close(dev_fd);
137 int dev_fd, file_fd;
140 dev_fd = open(dev, O_RDWR);
141 if (dev_fd < 0) {
149 close(dev_fd);
153 if (ioctl(dev_fd, LOOP_SET_FD, file_fd) < 0) {
154 close(dev_fd);
168 if (ioctl(dev_fd, LOOP_SET_STATUS, &loopinfo)) {
169 close(dev_fd);
176 close(dev_fd);
183 int dev_fd, ret, i;
185 dev_fd = open(dev, O_RDONLY);
186 if (dev_fd < 0) {
194 ret = ioctl(dev_fd, LOOP_CLR_FD, 0);
197 close(dev_fd);
205 close(dev_fd);
212 close(dev_fd);