Home
last modified time | relevance | path

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

/freebsd-13.1/usr.bin/mail/
H A Dedit.c146 (void)snprintf(tempname, sizeof(tempname), in run_editor()
150 warn("%s", tempname); in run_editor()
154 warn("%s", tempname); in run_editor()
155 (void)rm(tempname); in run_editor()
172 (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()
210 (void)rm(tempname); in run_editor()
[all …]
H A Dquit.c112 (void)snprintf(tempname, sizeof(tempname), in quit()
133 (void)rm(tempname); in quit()
204 (void)snprintf(tempname, sizeof(tempname), in quit()
208 warn("%s", tempname); in quit()
213 warn("%s", tempname); in quit()
214 (void)rm(tempname); in quit()
219 (void)rm(tempname); in quit()
428 (void)snprintf(tempname, sizeof(tempname), in edstop()
439 (void)rm(tempname); in edstop()
450 (void)rm(tempname); in edstop()
[all …]
H A Dcollect.c101 (void)rm(tempname); in collect()
107 (void)snprintf(tempname, sizeof(tempname), in collect()
109 if ((fd = mkstemp(tempname)) == -1 || in collect()
111 warn("%s", tempname); in collect()
114 (void)rm(tempname); in collect()
430 if (forward(linebuf + 2, collf, tempname, c) < 0) in collect()
567 char *sh, tempname[PATHSIZE]; in mespipe() local
569 (void)snprintf(tempname, sizeof(tempname), in mespipe()
571 if ((fd = mkstemp(tempname)) == -1 || in mespipe()
573 warn("%s", tempname); in mespipe()
[all …]
H A Dsend.c460 char tempname[PATHSIZE]; in infix() local
462 (void)snprintf(tempname, sizeof(tempname), in infix()
464 if ((fd = mkstemp(tempname)) == -1 || in infix()
466 warn("%s", tempname); in infix()
469 if ((nfi = Fopen(tempname, "r")) == NULL) { in infix()
470 warn("%s", tempname); in infix()
472 (void)rm(tempname); in infix()
475 (void)rm(tempname); in infix()
490 warn("%s", tempname); in infix()
H A Dlex.c74 char tempname[PATHSIZE]; in setfile() local
132 (void)snprintf(tempname, sizeof(tempname), in setfile()
134 if ((fd = mkstemp(tempname)) == -1 || (otf = fdopen(fd, "w")) == NULL) in setfile()
135 err(1, "%s", tempname); in setfile()
137 if ((itf = fopen(tempname, "r")) == NULL) in setfile()
138 err(1, "%s", tempname); in setfile()
140 (void)rm(tempname); in setfile()
H A Dnames.c313 char tempname[PATHSIZE]; in outof() local
315 (void)snprintf(tempname, sizeof(tempname), in outof()
317 if ((fd = mkstemp(tempname)) == -1 || in outof()
319 warn("%s", tempname); in outof()
323 image = open(tempname, O_RDWR); in outof()
324 (void)rm(tempname); in outof()
326 warn("%s", tempname); in outof()
341 warn("%s", tempname); in outof()
/freebsd-13.1/sbin/ldconfig/
H A Delfhints.c256 char *tempname; in write_elf_hints() local
263 if ((fd = mkstemp(tempname)) == -1) in write_elf_hints()
264 err(1, "mkstemp(%s)", tempname); in write_elf_hints()
266 err(1, "fchmod(%s)", tempname); in write_elf_hints()
268 err(1, "fdopen(%s)", tempname); in write_elf_hints()
288 err(1, "%s: write error", tempname); in write_elf_hints()
292 err(1, "%s: write error", tempname); in write_elf_hints()
295 err(1, "%s: write error", tempname); in write_elf_hints()
298 err(1, "%s: write error", tempname); in write_elf_hints()
300 if (rename(tempname, hintsfile) == -1) in write_elf_hints()
[all …]
/freebsd-13.1/lib/libutil/
H A Dpw_util.c73 static char tempname[PATH_MAX]; variable
221 if (snprintf(tempname, sizeof(tempname), "%.*spw.XXXXXX", in pw_tmp()
233 unlink(tempname); in pw_tmp()
234 *tempname = '\0'; in pw_tmp()
293 if (stat(tempname, &st1) == -1) in pw_edit()
326 unlink(tempname); in pw_edit()
337 unlink(tempname); in pw_edit()
369 if (*tempname != '\0') { in pw_fini()
370 unlink(tempname); in pw_fini()
371 *tempname = '\0'; in pw_fini()
[all …]
H A Dgr_util.c52 static char tempname[PATH_MAX]; variable
141 if (snprintf(tempname, sizeof(tempname), "%.*sgroup.XXXXXX", in gr_tmp()
142 (int)(p - group_file), group_file) >= (int)sizeof(tempname)) { in gr_tmp()
146 if ((tfd = mkostemp(tempname, 0)) == -1) in gr_tmp()
153 unlink(tempname); in gr_tmp()
154 *tempname = '\0'; in gr_tmp()
336 if (chmod(tempname, 0644) != 0) in gr_mkdb()
339 if (rename(tempname, group_file) != 0) in gr_mkdb()
370 if (*tempname != '\0') { in gr_fini()
371 unlink(tempname); in gr_fini()
[all …]
/freebsd-13.1/contrib/less/
H A Dcmdbuf.c1595 char *tempname = ecalloc(1, strlen(filename)+1); local
1596 strcpy(tempname, filename);
1597 lastch = tempname[strlen(tempname)-1];
1598 tempname[strlen(tempname)-1] = (lastch == 'Q') ? 'Z' : 'Q';
1599 return tempname;
1700 char *tempname; in save_cmdhist() local
1713 tempname = make_tempname(histname); in save_cmdhist()
1714 fout = fopen(tempname, "w"); in save_cmdhist()
1740 rename(tempname, histname); in save_cmdhist()
1742 free(tempname); in save_cmdhist()
/freebsd-13.1/lib/libc/tests/gen/
H A Ddlopen_empty_test.c60 char tempname[] = "/tmp/temp.XXXXXX"; in ATF_TC_BODY() local
66 fname = mktemp(tempname); in ATF_TC_BODY()
/freebsd-13.1/usr.bin/unifdef/
H A Dunifdef.c453 tempname = astrcat(ofn, ".XXXXXX"); in processinout()
454 output = mktempmode(tempname, st.st_mode); in processinout()
456 err(2, "can't create %s", tempname); in processinout()
468 if (remove(tempname) < 0) in processinout()
469 warn("can't remove \"%s\"", tempname); in processinout()
470 } else if (rename(tempname, ofn) < 0) in processinout()
471 err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn); in processinout()
472 free(tempname); in processinout()
473 tempname = NULL; in processinout()
482 if (tempname != NULL) in cleantemp()
[all …]
/freebsd-13.1/usr.sbin/kldxref/
H A Dkldxref.c660 static char xrefname[MAXPATHLEN], tempname[MAXPATHLEN]; variable
735 rename(tempname, xrefname); in main()
738 unlink(tempname); in main()
748 fxref = maketempfile(tempname, ftsp->fts_path); in main()
750 err(1, "can't create %s", tempname); in main()
/freebsd-13.1/contrib/diff/
H A DFREEBSD-Xlist46 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-13.1/sbin/fsck_ffs/
H A Ddir.c478 char tempname[BUFSIZ]; in linkup() local
568 (void)lftempname(tempname, orphan); in linkup()
569 if (makeentry(lfdir, orphan, (name ? name : tempname)) == 0) { in linkup()
/freebsd-13.1/crypto/openssl/apps/
H A Dapps.c2368 WCHAR tempname[MAX_PATH]; in app_isdir() local
2374 if (!MultiByteToWideChar(CP_ACP, 0, name, len_0, tempname, MAX_PATH)) in app_isdir()
2377 tempname[i] = (WCHAR)name[i]; in app_isdir()
2379 attr = GetFileAttributes(tempname); in app_isdir()
/freebsd-13.1/contrib/subversion/subversion/libsvn_subr/
H A Dio.c5565 const char *tempname; in svn_io_open_unique_file3() local
5612 SVN_ERR(temp_file_create(&tempfile, &tempname, dirpath, flags, in svn_io_open_unique_file3()
5641 svn_dirent_local_style(tempname, scratch_pool)); in svn_io_open_unique_file3()
5653 *unique_path = tempname; /* Was allocated in result_pool */ in svn_io_open_unique_file3()
5656 SVN_ERR(cstring_from_utf8(&baton->fname_apr, tempname, result_pool)); in svn_io_open_unique_file3()