Lines Matching defs:path

660 		/* Convert source path to absolute. */
700 /* Trim common path components. */
730 * build a path name and install the file
756 /* Build the target path. */
1095 * create a temporary file based on path and open it
1098 create_tempfile(const char *path, char *temp, size_t tsize)
1102 (void)strncpy(temp, path, tsize);
1118 create_newfile(const char *path, int target, struct stat *sbp)
1131 (void)chflags(path, sbp->st_flags & ~NOCHANGEBITS);
1135 path, suffix) != strlen(path) + strlen(suffix)) {
1138 (void)chflags(path, sbp->st_flags);
1141 path);
1144 path, suffix);
1147 path, backup);
1148 if (rename(path, backup) < 0) {
1151 (void)chflags(path, sbp->st_flags);
1153 err(EX_OSERR, "rename: %s to %s", path, backup);
1156 if (unlink(path) < 0)
1160 newfd = open(path, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR);
1285 install_dir(char *path)
1291 for (p = path;; ++p)
1292 if (!*p || (p != path && *p == '/')) {
1296 if (stat(path, &sb) < 0) {
1298 err(EX_OSERR, "stat %s", path);
1299 if (mkdir(path, 0755) < 0) {
1302 err(EX_OSERR, "mkdir %s", path);
1306 path);
1308 errx(EX_OSERR, "%s exists but is not a directory", path);
1315 chown(path, uid, gid))
1316 warn("chown %u:%u %s", uid, gid, path);
1318 if (chmod(path, mode))
1319 warn("chmod %o %s", mode, path);
1321 metadata_log(path, "dir", NULL, NULL, NULL, 0);
1326 * if metafp is not NULL, output mtree(8) full path name and settings to
1331 metadata_log(const char *path, const char *type, struct timespec *ts,
1343 buf = (char *)malloc(4 * strlen(path) + 1);
1361 p = path;