Lines Matching defs:dir
83 // TODO what if you --bind mount a block device somewhere (file, dir, dev)
167 static void mount_filesystem(char *dev, char *dir, char *type,
200 // file on file or dir on dir is a --bind mount.
201 if (!stat(dev, &stdev) && !stat(dir, &stdir)
236 printf("try '%s' type '%s' on '%s'\n", dev, type, dir);
238 rc = mount(dev, dir, type, flags, opts);
257 // Trying to autodetect loop mounts like bind mounts above (file on dir)
258 // isn't good enough because "mount -t ext2 fs.img dir" is valid, but if
281 perror_msg("'%s'->'%s'", dev, dir);
290 char *opts = 0, *dev = 0, *dir = 0, **ss;
315 else if (!dir) dir = sss;
320 if (FLAG(a) && dir) error_exit("-a with >1 arg");
333 if (FLAG(a) || (dev && (!dir || getuid() || remount))) {
350 if (strncmp(dev, mm->dir, len)
351 || (mm->dir[len] && mm->dir[len] != '/')) continue;
356 if (dir && strcmp(dir, mm->dir)) continue;
357 if (dev && strcmp(dev, mm->device) && (dir || strcmp(dev, mm->dir)))
365 if (!strcmp(mm->dir, mmm->dir) && !strcmp(mm->device, mmm->device))
374 mount_filesystem(mm->device, mm->dir, mm->type, aflags, aopts);
385 error_exit("'%s' not in %s", dir ? dir : dev,
396 s ? s : mm->device, mm->dir, mm->type, mm->opts);
405 mount_filesystem(dev, dir, TT.type, flags, more);