Home
last modified time | relevance | path

Searched refs:tempname (Results 1 – 19 of 19) sorted by relevance

/freebsd/usr.bin/mail/
H A Dedit.c138 (void)snprintf(tempname, sizeof(tempname), in run_editor()
142 warn("%s", tempname); in run_editor()
146 warn("%s", tempname); in run_editor()
147 (void)rm(tempname); in run_editor()
164 (void)rm(tempname); in run_editor()
170 (void)rm(tempname); in run_editor()
178 (void)rm(tempname); in run_editor()
186 (void)rm(tempname); in run_editor()
194 (void)rm(tempname); in run_editor()
202 (void)rm(tempname); in run_editor()
[all …]
H A Dquit.c104 (void)snprintf(tempname, sizeof(tempname), in quit()
125 (void)rm(tempname); in quit()
196 (void)snprintf(tempname, sizeof(tempname), in quit()
200 warn("%s", tempname); in quit()
205 warn("%s", tempname); in quit()
206 (void)rm(tempname); in quit()
211 (void)rm(tempname); in quit()
420 (void)snprintf(tempname, sizeof(tempname), in edstop()
431 (void)rm(tempname); in edstop()
442 (void)rm(tempname); in edstop()
[all …]
H A Dcollect.c93 (void)rm(tempname); in collect()
99 (void)snprintf(tempname, sizeof(tempname), in collect()
101 if ((fd = mkstemp(tempname)) == -1 || in collect()
103 warn("%s", tempname); in collect()
106 (void)rm(tempname); in collect()
422 if (forward(linebuf + 2, collf, tempname, c) < 0) in collect()
559 char *sh, tempname[PATHSIZE]; in mespipe() local
561 (void)snprintf(tempname, sizeof(tempname), in mespipe()
563 if ((fd = mkstemp(tempname)) == -1 || in mespipe()
565 warn("%s", tempname); in mespipe()
[all …]
H A Dsend.c452 char tempname[PATHSIZE]; in infix() local
454 (void)snprintf(tempname, sizeof(tempname), in infix()
456 if ((fd = mkstemp(tempname)) == -1 || in infix()
458 warn("%s", tempname); in infix()
461 if ((nfi = Fopen(tempname, "r")) == NULL) { in infix()
462 warn("%s", tempname); in infix()
464 (void)rm(tempname); in infix()
467 (void)rm(tempname); in infix()
482 warn("%s", tempname); in infix()
H A Dlex.c66 char tempname[PATHSIZE]; in setfile() local
124 (void)snprintf(tempname, sizeof(tempname), in setfile()
126 if ((fd = mkstemp(tempname)) == -1 || (otf = fdopen(fd, "w")) == NULL) in setfile()
127 err(1, "%s", tempname); in setfile()
129 if ((itf = fopen(tempname, "r")) == NULL) in setfile()
130 err(1, "%s", tempname); in setfile()
132 (void)rm(tempname); in setfile()
H A Dnames.c305 char tempname[PATHSIZE]; in outof() local
307 (void)snprintf(tempname, sizeof(tempname), in outof()
309 if ((fd = mkstemp(tempname)) == -1 || in outof()
311 warn("%s", tempname); in outof()
315 image = open(tempname, O_RDWR); in outof()
316 (void)rm(tempname); in outof()
318 warn("%s", tempname); in outof()
333 warn("%s", tempname); in outof()
/freebsd/sbin/ldconfig/
H A Delfhints.c270 char *tempname; in write_elf_hints() local
277 if ((fd = mkstemp(tempname)) == -1) in write_elf_hints()
278 err(1, "mkstemp(%s)", tempname); in write_elf_hints()
280 err(1, "fchmod(%s)", tempname); in write_elf_hints()
282 err(1, "fdopen(%s)", tempname); in write_elf_hints()
304 err(1, "%s: write error", tempname); in write_elf_hints()
308 err(1, "%s: write error", tempname); in write_elf_hints()
311 err(1, "%s: write error", tempname); in write_elf_hints()
314 err(1, "%s: write error", tempname); in write_elf_hints()
316 if (rename(tempname, hintsfile) == -1) in write_elf_hints()
[all …]
/freebsd/lib/libutil/
H A Dpw_util.c70 static char tempname[PATH_MAX]; variable
218 if (snprintf(tempname, sizeof(tempname), "%.*spw.XXXXXX", in pw_tmp()
230 unlink(tempname); in pw_tmp()
231 *tempname = '\0'; in pw_tmp()
290 if (stat(tempname, &st1) == -1) in pw_edit()
323 unlink(tempname); in pw_edit()
334 unlink(tempname); in pw_edit()
366 if (*tempname != '\0') { in pw_fini()
367 unlink(tempname); in pw_fini()
368 *tempname = '\0'; in pw_fini()
[all …]
H A Dgr_util.c49 static char tempname[PATH_MAX]; variable
138 if (snprintf(tempname, sizeof(tempname), "%.*sgroup.XXXXXX", in gr_tmp()
139 (int)(p - group_file), group_file) >= (int)sizeof(tempname)) { in gr_tmp()
143 if ((tfd = mkostemp(tempname, 0)) == -1) in gr_tmp()
150 unlink(tempname); in gr_tmp()
151 *tempname = '\0'; in gr_tmp()
333 if (chmod(tempname, 0644) != 0) in gr_mkdb()
336 if (rename(tempname, group_file) != 0) in gr_mkdb()
367 if (*tempname != '\0') { in gr_fini()
368 unlink(tempname); in gr_fini()
[all …]
/freebsd/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/contrib/less/
H A Dcmdbuf.c1532 char *tempname = ecalloc(1, strlen(filename)+1); in make_tempname() local
1533 strcpy(tempname, filename); in make_tempname()
1534 lastch = tempname[strlen(tempname)-1]; in make_tempname()
1535 tempname[strlen(tempname)-1] = (lastch == 'Q') ? 'Z' : 'Q'; in make_tempname()
1536 return tempname; in make_tempname()
1632 char *tempname; in save_cmdhist() local
1645 tempname = make_tempname(histname); in save_cmdhist()
1646 fout = fopen(tempname, "w"); in save_cmdhist()
1672 rename(tempname, histname); in save_cmdhist()
1674 free(tempname); in save_cmdhist()
/freebsd/lib/libc/tests/gen/
H A Ddlopen_empty_test.c57 char tempname[] = "/tmp/temp.XXXXXX"; in ATF_TC_BODY() local
63 fname = mktemp(tempname); in ATF_TC_BODY()
/freebsd/contrib/unifdef/
H A Dunifdef.c424 tempname = astrcat(ofn, ".XXXXXX"); in processinout()
425 output = mktempmode(tempname, st.st_mode); in processinout()
427 err(2, "can't create %s", tempname); in processinout()
439 if (remove(tempname) < 0) in processinout()
440 warn("can't remove \"%s\"", tempname); in processinout()
441 } else if (replace(tempname, ofn) < 0) in processinout()
442 err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn); in processinout()
443 free(tempname); in processinout()
444 tempname = NULL; in processinout()
453 if (tempname != NULL) in cleantemp()
[all …]
/freebsd/contrib/tzcode/
H A Dzic.c652 char const *tempname) in close_file() argument
661 if (tempname) in close_file()
662 (void)remove(tempname); in close_file()
1390 if (!*tempname) in open_outfile()
1424 if (tempname) { in rename_dest()
1427 (void)remove(tempname); in rename_dest()
1432 free(tempname); in rename_dest()
1492 char *tempname = NULL; in dolink() local
2424 char *tempname = NULL; in writezone() local
2830 tempname); in writezone()
[all …]
/freebsd/usr.sbin/kldxref/
H A Dkldxref.c735 static char xrefname[MAXPATHLEN], tempname[MAXPATHLEN]; variable
818 rename(tempname, xrefname); in main()
821 unlink(tempname); in main()
831 fxref = maketempfile(tempname, ftsp->fts_path); in main()
833 err(1, "can't create %s", tempname); in main()
/freebsd/crypto/openssl/apps/lib/
H A Dopt.c1161 WCHAR tempname[MAX_PATH]; in opt_isdir() local
1167 if (!MultiByteToWideChar(CP_ACP, 0, name, len_0, tempname, MAX_PATH)) in opt_isdir()
1170 tempname[i] = (WCHAR)name[i]; in opt_isdir()
1172 attr = GetFileAttributes(tempname); in opt_isdir()
/freebsd/contrib/diff/
H A DFREEBSD-Xlist44 lib/tempname.c
H A DChangeLog680 (tempname): Use AC_LIBOBJS, not LIBOBJS=, as now required by autoconf.
708 lib/tempname.c: Update to latest version from other packages.
1677 * lib/tempname.c (uint64_t):
1682 * lib/tempname.c: glibc 1.32
1690 * lib/tempname.c (struct_stat64): New macro.
1694 * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
/freebsd/sbin/fsck_ffs/
H A Ddir.c571 char tempname[BUFSIZ]; in linkup() local
662 (void)lftempname(tempname, orphan); in linkup()
663 if (makeentry(lfdir, orphan, (name ? name : tempname)) == 0) { in linkup()