Searched refs:tempname (Results 1 - 17 of 17) sorted by relevance

/freebsd-current/usr.bin/mail/
H A Dedit.c135 char *edit, tempname[PATHSIZE]; local
138 (void)snprintf(tempname, sizeof(tempname),
140 if ((t = mkstemp(tempname)) == -1 ||
142 warn("%s", tempname);
146 warn("%s", tempname);
147 (void)rm(tempname);
163 warnx("%s", tempname);
164 (void)rm(tempname);
169 warn("%s", tempname);
[all...]
H A Dquit.c70 char *mbox, tempname[PATHSIZE]; local
104 (void)snprintf(tempname, sizeof(tempname),
106 if ((fd = mkstemp(tempname)) == -1 ||
123 if ((rbuf = Fopen(tempname, "r")) == NULL)
125 (void)rm(tempname);
196 (void)snprintf(tempname, sizeof(tempname),
198 if ((fd = mkstemp(tempname)) == -1 ||
200 warn("%s", tempname);
389 char tempname[PATHSIZE]; local
[all...]
H A Dcollect.c71 char linebuf[LINESIZE], tempname[PATHSIZE], *cp, getsub; local
93 (void)rm(tempname);
99 (void)snprintf(tempname, sizeof(tempname),
101 if ((fd = mkstemp(tempname)) == -1 ||
103 warn("%s", tempname);
106 (void)rm(tempname);
422 if (forward(linebuf + 2, collf, tempname, c) < 0)
559 char *sh, tempname[PATHSIZE]; local
561 (void)snprintf(tempname, sizeo
[all...]
H A Dsend.c452 char tempname[PATHSIZE]; local
454 (void)snprintf(tempname, sizeof(tempname),
456 if ((fd = mkstemp(tempname)) == -1 ||
458 warn("%s", tempname);
461 if ((nfi = Fopen(tempname, "r")) == NULL) {
462 warn("%s", tempname);
464 (void)rm(tempname);
467 (void)rm(tempname);
482 warn("%s", tempname);
[all...]
H A Dlex.c66 char tempname[PATHSIZE]; local
124 (void)snprintf(tempname, sizeof(tempname),
126 if ((fd = mkstemp(tempname)) == -1 || (otf = fdopen(fd, "w")) == NULL)
127 err(1, "%s", tempname);
129 if ((itf = fopen(tempname, "r")) == NULL)
130 err(1, "%s", tempname);
132 (void)rm(tempname);
H A Dnames.c305 char tempname[PATHSIZE]; local
307 (void)snprintf(tempname, sizeof(tempname),
309 if ((fd = mkstemp(tempname)) == -1 ||
311 warn("%s", tempname);
315 image = open(tempname, O_RDWR);
316 (void)rm(tempname);
318 warn("%s", tempname);
333 warn("%s", tempname);
/freebsd-current/sbin/ldconfig/
H A Delfhints.c270 char *tempname; local
275 if (asprintf(&tempname, "%s.XXXXXX", hintsfile) == -1)
277 if ((fd = mkstemp(tempname)) == -1)
278 err(1, "mkstemp(%s)", tempname);
280 err(1, "fchmod(%s)", tempname);
282 err(1, "fdopen(%s)", tempname);
304 err(1, "%s: write error", tempname);
308 err(1, "%s: write error", tempname);
311 err(1, "%s: write error", tempname);
314 err(1, "%s: write error", tempname);
[all...]
/freebsd-current/tools/test/stress2/misc/
H A Dtruncate6.sh102 char tempname[] = "file";
105 if ((fd = open(tempname, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE)) ==
107 err(1, "open(%s)", tempname);
/freebsd-current/lib/libc/tests/gen/
H A Ddlopen_empty_test.c57 char tempname[] = "/tmp/temp.XXXXXX"; local
63 fname = mktemp(tempname);
/freebsd-current/lib/libutil/
H A Dpw_util.c70 static char tempname[PATH_MAX]; variable
218 if (snprintf(tempname, sizeof(tempname), "%.*spw.XXXXXX",
219 (int)(p - masterpasswd), masterpasswd) >= (int)sizeof(tempname)) {
223 if ((tfd = mkostemp(tempname, 0)) == -1)
230 unlink(tempname);
231 *tempname = '\0';
256 "-d", passwd_dir, tempname, (char *)NULL);
259 "-d", passwd_dir, "-u", user, tempname,
290 if (stat(tempname,
[all...]
H A Dgr_util.c49 static char tempname[PATH_MAX]; variable
138 if (snprintf(tempname, sizeof(tempname), "%.*sgroup.XXXXXX",
139 (int)(p - group_file), group_file) >= (int)sizeof(tempname)) {
143 if ((tfd = mkostemp(tempname, 0)) == -1)
150 unlink(tempname);
151 *tempname = '\0';
333 if (chmod(tempname, 0644) != 0)
336 if (rename(tempname, group_file) != 0)
367 if (*tempname !
[all...]
/freebsd-current/contrib/less/
H A Dcmdbuf.c1532 char *tempname = ecalloc(1, strlen(filename)+1); local
1533 strcpy(tempname, filename);
1534 lastch = tempname[strlen(tempname)-1];
1535 tempname[strlen(tempname)-1] = (lastch == 'Q') ? 'Z' : 'Q';
1536 return tempname;
1632 char *tempname; local
1645 tempname = make_tempname(histname);
1646 fout = fopen(tempname, "
[all...]
/freebsd-current/contrib/unifdef/
H A Dunifdef.c192 static char *tempname; /* avoid splatting input */ variable
424 tempname = astrcat(ofn, ".XXXXXX");
425 output = mktempmode(tempname, st.st_mode);
427 err(2, "can't create %s", tempname);
439 if (remove(tempname) < 0)
440 warn("can't remove \"%s\"", tempname);
441 } else if (replace(tempname, ofn) < 0)
442 err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn);
443 free(tempname);
444 tempname
[all...]
/freebsd-current/usr.sbin/kldxref/
H A Dkldxref.c735 static char xrefname[MAXPATHLEN], tempname[MAXPATHLEN]; variable
818 rename(tempname, xrefname);
821 unlink(tempname);
831 fxref = maketempfile(tempname, ftsp->fts_path);
833 err(1, "can't create %s", tempname);
/freebsd-current/contrib/tzcode/
H A Dzic.c652 char const *tempname)
661 if (tempname)
662 (void)remove(tempname);
1380 open_outfile(char const **outname, char **tempname) argument
1390 if (!*tempname)
1391 random_dirent(outname, tempname);
1407 random_dirent(outname, tempname);
1422 rename_dest(char *tempname, char const *name) argument
1424 if (tempname) {
1425 if (rename(tempname, nam
651 close_file(FILE *stream, char const *dir, char const *name, char const *tempname) argument
1492 char *tempname = NULL; local
2424 char *tempname = NULL; local
[all...]
/freebsd-current/crypto/openssl/apps/lib/
H A Dopt.c1161 WCHAR tempname[MAX_PATH]; local
1167 if (!MultiByteToWideChar(CP_ACP, 0, name, len_0, tempname, MAX_PATH))
1170 tempname[i] = (WCHAR)name[i];
1172 attr = GetFileAttributes(tempname);
/freebsd-current/sbin/fsck_ffs/
H A Ddir.c571 char tempname[BUFSIZ]; local
662 (void)lftempname(tempname, orphan);
663 if (makeentry(lfdir, orphan, (name ? name : tempname)) == 0) {

Completed in 303 milliseconds