Lines Matching defs:file
15 Associate a loopback device with a file, or show current file (if any)
24 -c Check capacity (file size changed)
52 static int loopback_setup(char *device, char *file)
58 // Open file (ffd) and loop device (lfd)
60 if (file) ffd = xopen(file, TT.openflags);
83 if (errno == ENXIO && FLAG(f) && !file) {
87 if (errno != ENXIO || !file) {
97 // Check size of file or delete existing association
104 // Associate file with this device?
105 } else if (file) {
106 char *f_path = xabspath(file, ABS_PATH);
108 if (!f_path) perror_exit("%s", file); // already opened but if deleted since
112 perror_exit("%s=%s", device, file);
118 if (ioctl(lfd, LOOP_SET_STATUS64, loop)) perror_exit("%s=%s", device, file);
172 // new association: S size o offset rs - need a file
187 char *file = (FLAG(c) || FLAG(d)) ? NULL : toys.optargs[1];
189 if (!toys.optc || (file && toys.optc != 2))
190 help_exit("needs %d arg%s", 1+!!file, file ? "s" : "");
192 loopback_setup(*s, file);
193 if (file) break;