Lines Matching refs:tempfile
2521 char *realfile, *slash, tempfile[MAXPATHLEN];
2532 strlcpy(tempfile, realfile, sizeof(tempfile));
2533 slash = strrchr(tempfile, '/');
2536 failed = stat(tempfile, &st);
2538 err(1, "Error on stat(%s)", tempfile);
2540 createdir(ent, tempfile);
2543 tempfile);
2553 strlcpy(tempfile, realfile, sizeof(tempfile));
2554 strlcat(tempfile, ".zXXXXXX", sizeof(tempfile));
2556 printf("\tmktemp %s\n", tempfile);
2558 fd = mkstemp(tempfile);
2560 err(1, "can't mkstemp logfile %s", tempfile);
2566 if (log_trim(tempfile, ent))
2575 tempfile);
2579 err(1, "can't fchown temp file %s", tempfile);
2586 printf("\tchflags nodump %s\n", tempfile);
2606 printf("\tchmod %o %s\n", ent->permissions, tempfile);
2607 printf("\tmv %s %s\n", tempfile, realfile);
2611 err(1, "can't fchmod temp file '%s'", tempfile);
2612 failed = rename(tempfile, realfile);
2614 err(1, "can't mv %s to %s", tempfile, realfile);