Lines Matching refs:mountpoint
183 struct stat mountpoint; in main() local
505 if (stat(node, &mountpoint) == -1) in main()
507 mfsuid = mountpoint.st_uid; in main()
508 mfsgid = mountpoint.st_gid; in main()
509 mfsmode = mountpoint.st_mode & ALLPERMS; in main()
761 char mountpoint[MNAMELEN]; in copy() local
766 strlcpy(mountpoint, src, sizeof(mountpoint)); in copy()
768 created = gettmpmnt(mountpoint, sizeof(mountpoint)); in copy()
771 ret = mount(MOUNT_FFS, mountpoint, MNT_RDONLY, &mount_args); in copy()
774 if (created && rmdir(mountpoint) != 0) in copy()
775 warn("rmdir %s", mountpoint); in copy()
778 errc(1, saved_errno, "mount %s %s", src, mountpoint); in copy()
781 ret = do_exec(mountpoint, "/bin/pax", argv); in copy()
782 if (!dir && unmount(mountpoint, 0) != 0) in copy()
783 warn("unmount %s", mountpoint); in copy()
784 if (created && rmdir(mountpoint) != 0) in copy()
785 warn("rmdir %s", mountpoint); in copy()
789 errx(1, "copy %s to %s failed", mountpoint, dst); in copy()
794 gettmpmnt(char *mountpoint, size_t len) in gettmpmnt() argument
808 if (strlcpy(mountpoint, mnt, len) >= len) in gettmpmnt()
812 n = strlcpy(mountpoint, tmp, len); in gettmpmnt()
815 if (mountpoint[n - 1] != '/') in gettmpmnt()
816 strlcat(mountpoint, "/", len); in gettmpmnt()
817 n = strlcat(mountpoint, "mntXXXXXXXXXX", len); in gettmpmnt()
820 if (mkdtemp(mountpoint) == NULL) in gettmpmnt()
821 err(1, "mkdtemp %s", mountpoint); in gettmpmnt()