Lines Matching defs:tempfile
2097 char *realfile, *slash, tempfile[MAXPATHLEN];
2108 strlcpy(tempfile, realfile, sizeof(tempfile));
2109 slash = strrchr(tempfile, '/');
2112 failed = stat(tempfile, &st);
2114 err(1, "Error on stat(%s)", tempfile);
2116 createdir(ent, tempfile);
2119 tempfile);
2129 strlcpy(tempfile, realfile, sizeof(tempfile));
2130 strlcat(tempfile, ".zXXXXXX", sizeof(tempfile));
2132 printf("\tmktemp %s\n", tempfile);
2134 fd = mkstemp(tempfile);
2136 err(1, "can't mkstemp logfile %s", tempfile);
2142 if (log_trim(tempfile, ent))
2151 tempfile);
2155 err(1, "can't fchown temp file %s", tempfile);
2162 printf("\tchflags nodump %s\n", tempfile);
2182 printf("\tchmod %o %s\n", ent->permissions, tempfile);
2183 printf("\tmv %s %s\n", tempfile, realfile);
2187 err(1, "can't fchmod temp file '%s'", tempfile);
2188 failed = rename(tempfile, realfile);
2190 err(1, "can't mv %s to %s", tempfile, realfile);