Home
last modified time | relevance | path

Searched refs:tmpfd (Results 1 – 16 of 16) sorted by relevance

/netbsd/src/external/bsd/am-utils/dist/conf/mtab/
Dmtab_file.c251 int tmpfd; in rewrite_mtab() local
269 tmpfd = mkstemp(tmpname); in rewrite_mtab()
270 fchmod(tmpfd, 0644); in rewrite_mtab()
273 tmpfd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644); in rewrite_mtab()
275 if (tmpfd < 0) { in rewrite_mtab()
283 if (close(tmpfd) < 0) in rewrite_mtab()
Dmtab_mach3.c316 int tmpfd; in rewrite_mtab() local
333 tmpfd = mkstemp(tmpname); in rewrite_mtab()
334 fchmod(tmpfd, 0644); in rewrite_mtab()
337 tmpfd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644); in rewrite_mtab()
339 if (tmpfd < 0) { in rewrite_mtab()
347 if (close(tmpfd) < 0) in rewrite_mtab()
Dmtab_linux.c346 int tmpfd; in rewrite_mtab() local
372 tmpfd = mkstemp(tmpname); in rewrite_mtab()
373 fchmod(tmpfd, 0644); in rewrite_mtab()
376 tmpfd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644); in rewrite_mtab()
378 if (tmpfd < 0) { in rewrite_mtab()
386 if (close(tmpfd) < 0) in rewrite_mtab()
/netbsd/src/sys/ufs/chfs/
Dchfs_build.c72 struct chfs_dirent *fd, *tmpfd; in chfs_build_set_vnodecache_nlink() local
74 TAILQ_FOREACH_SAFE(fd, &vc->scan_dirents, fds, tmpfd) { in chfs_build_set_vnodecache_nlink()
115 struct chfs_dirent *fd, *tmpfd; in chfs_build_remove_unlinked_vnode() local
140 TAILQ_FOREACH_SAFE(fd, &vc->scan_dirents, fds, tmpfd) { in chfs_build_remove_unlinked_vnode()
212 struct chfs_dirent *fd, *tmpfd; in chfs_build_filesystem() local
322 TAILQ_FOREACH_SAFE(fd, &unlinked, fds, tmpfd) { in chfs_build_filesystem()
340 TAILQ_FOREACH_SAFE(fd, &vc->scan_dirents, fds, tmpfd) { in chfs_build_filesystem()
Dchfs_nodeops.c176 struct chfs_dirent *fd, *tmpfd; in chfs_add_fd_to_inode() local
183 TAILQ_FOREACH_SAFE(fd, &parent->dents, fds, tmpfd) { in chfs_add_fd_to_inode()
Dchfs_scan.c216 struct chfs_dirent *fd, *tmpfd; in chfs_add_fd_to_list() local
229 TAILQ_FOREACH_SAFE(fd, &pvc->scan_dirents, fds, tmpfd) { in chfs_add_fd_to_list()
Dchfs_write.c469 struct chfs_dirent *fd, *tmpfd; in chfs_do_unlink() local
481 TAILQ_FOREACH_SAFE(fd, &parent->dents, fds, tmpfd) { in chfs_do_unlink()
Dchfs_gc.c306 struct chfs_dirent *fd, *tmpfd; in chfs_clear_inode() local
330 TAILQ_FOREACH_SAFE(fd, &ip->dents, fds, tmpfd) { in chfs_clear_inode()
/netbsd/src/lib/libossaudio/
Doss4_mixer.c593 int tmpfd; in get_audio_count() local
599 if ((tmpfd = open(devname, O_RDONLY)) != -1 || in get_audio_count()
600 (tmpfd = open(devname, O_WRONLY)) != -1) { in get_audio_count()
602 close(tmpfd); in get_audio_count()
604 } while (tmpfd != -1); in get_audio_count()
614 int tmpfd; in get_mixer_count() local
620 if ((tmpfd = open(devname, O_RDONLY)) != -1) { in get_mixer_count()
622 close(tmpfd); in get_mixer_count()
624 } while (tmpfd != -1); in get_mixer_count()
/netbsd/src/usr.bin/mkdep/
Dmkdep.c103 int tmpfd; in run_cc() local
125 if ((tmpfd = mkstemp(tmpfilename)) < 0) in run_cc()
140 (void)dup2(tmpfd, STDOUT_FILENO); in run_cc()
141 (void)close(tmpfd); in run_cc()
160 return tmpfd; in run_cc()
/netbsd/src/usr.sbin/edquota/
Dedquota.c1242 int tmpfd, const char *tmppath) in editone() argument
1259 if (writeprivs(curprivs, tmpfd, name, idtype, in editone()
1266 if (readprivs(curprivs, tmpfd, dflag) < 0) in editone()
1278 int tmpfd, i; in edit() local
1280 tmpfd = mkstemp(tmppath); in edit()
1281 fchown(tmpfd, getuid(), getgid()); in edit()
1284 editone(fs, idtype, names[i], tmpfd, tmppath); in edit()
1287 close(tmpfd); in edit()
/netbsd/src/external/gpl3/binutils/dist/binutils/
Dar.c1246 int tmpfd = -1; in write_archive() local
1249 new_name = make_tempname (old_name, &tmpfd); in write_archive()
1256 obfd = bfd_fdopenw (new_name, bfd_get_target (iarch), tmpfd); in write_archive()
1260 close (tmpfd); in write_archive()
1289 tmpfd = dup (tmpfd); in write_archive()
1298 if (smart_rename (new_name, old_name, tmpfd, NULL, false) != 0) in write_archive()
Dobjcopy.c4943 int tmpfd = -1; in strip_main() local
4955 tmpname = make_tempname (argv[i], &tmpfd); in strip_main()
4956 if (tmpfd >= 0) in strip_main()
4957 copyfd = dup (tmpfd); in strip_main()
4971 copy_file (argv[i], tmpname, tmpfd, &statbuf, input_target, in strip_main()
5229 int tmpfd = -1; in copy_main() local
6059 tmpname = make_tempname (input_filename, &tmpfd); in copy_main()
6060 if (tmpfd >= 0) in copy_main()
6061 copyfd = dup (tmpfd); in copy_main()
6072 copy_file (input_filename, tmpname, tmpfd, &statbuf, input_target, in copy_main()
DChangeLog1974 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
1975 closing output temp file, and pass tmpfd to smart_rename.
/netbsd/src/external/bsd/libarchive/dist/libarchive/
Darchive_write_disk_posix.c4234 copy_xattrs(struct archive_write_disk *a, int tmpfd, int dffd) in copy_xattrs() argument
4240 xattr_size = flistxattr(tmpfd, NULL, 0, 0); in copy_xattrs()
4254 xattr_size = flistxattr(tmpfd, xattr_names, xattr_size, 0); in copy_xattrs()
4267 s = fgetxattr(tmpfd, xattr_names + xattr_i, NULL, 0, 0, 0); in copy_xattrs()
4282 s = fgetxattr(tmpfd, xattr_names + xattr_i, xattr_val, s, 0, 0); in copy_xattrs()
4305 copy_acls(struct archive_write_disk *a, int tmpfd, int dffd) in copy_acls() argument
4313 acl = acl_get_fd(tmpfd); in copy_acls()
4344 int tmpfd; in create_tempdatafork() local
4348 tmpfd = mkstemp(tmpdatafork.s); in create_tempdatafork()
4349 if (tmpfd < 0) { in create_tempdatafork()
[all …]
/netbsd/src/external/bsd/openldap/dist/clients/tools/
Dldapsearch.c1994 int tmpfd; in print_entry() local
2001 tmpfd = mkstemp( tmpfname ); in print_entry()
2003 if ( tmpfd < 0 ) { in print_entry()
2008 if (( tmpfp = fdopen( tmpfd, "w")) == NULL ) { in print_entry()