Home
last modified time | relevance | path

Searched refs:tmpf (Results 1 – 8 of 8) sorted by relevance

/freebsd/sys/contrib/openzfs/lib/libshare/
H A Dnfs.c91 nfs_init_tmpfile(const char *prefix, const char *mdir, struct tmpfile *tmpf) in nfs_init_tmpfile() argument
102 strlcpy(tmpf->name, prefix, sizeof (tmpf->name)); in nfs_init_tmpfile()
103 strlcat(tmpf->name, ".XXXXXXXX", sizeof (tmpf->name)); in nfs_init_tmpfile()
105 int fd = mkostemp(tmpf->name, O_CLOEXEC); in nfs_init_tmpfile()
112 tmpf->fp = fdopen(fd, "w+"); in nfs_init_tmpfile()
113 if (tmpf->fp == NULL) { in nfs_init_tmpfile()
124 nfs_abort_tmpfile(struct tmpfile *tmpf) in nfs_abort_tmpfile() argument
126 unlink(tmpf->name); in nfs_abort_tmpfile()
127 fclose(tmpf->fp); in nfs_abort_tmpfile()
131 nfs_fini_tmpfile(const char *exports, struct tmpfile *tmpf) in nfs_fini_tmpfile() argument
[all …]
/freebsd/lib/libc/tests/stdio/
H A Dmkostemp_test.c51 char tmpf[sizeof(template)]; in test_one() local
55 memcpy(tmpf, template, sizeof(tmpf)); in test_one()
56 fd = mkostemp(tmpf, oflags); in test_one()
63 if (memcmp(tmpf, template, sizeof(tmpf) - 8 - 1) != 0) { in test_one()
66 testnum++, oflags, tmpf); in test_one()
83 if (stat(tmpf, &st1) == -1) { in test_one()
86 testnum++, oflags, tmpf, strerror(errno)); in test_one()
115 (void)unlink(tmpf); in test_one()
130 (void)unlink(tmpf); in test_one()
165 char tmpf[sizeof(template)]; in ATF_TC_BODY() local
[all …]
/freebsd/usr.sbin/periodic/etc/security/
H A Dsecurity.functions56 tmpf="$1"; shift
59 if [ "${tmpf}" = "-" ]; then
60 tmpf=`mktemp -t security`
61 cat > ${tmpf}
68 cp ${tmpf} ${LOG}/${label}.today || rc=3
71 if ! cmp -s ${LOG}/${label}.today ${tmpf} >/dev/null; then
76 ${tmpf} | eval "${filter}"
78 mv ${tmpf} ${LOG}/${label}.today || rc=3
81 rm -f ${tmpf}
/freebsd/usr.sbin/pmcannotate/
H A Dpmcannotate.c426 char tmpf[MAXPATHLEN * 2 + 50]; in fqueue_getall() local
433 bzero(tmpf, sizeof(tmpf)); in fqueue_getall()
438 snprintf(tmpf, sizeof(tmpf), in fqueue_getall()
443 snprintf(tmpf, sizeof(tmpf), in fqueue_getall()
447 if (system(tmpf) != 0) in fqueue_getall()
696 char tmpf[MAXPATHLEN * 2 + 50]; in main() local
755 bzero(tmpf, sizeof(tmpf)); in main()
771 snprintf(tmpf, sizeof(tmpf), "pmcstat -k %s -R %s -m %s", in main()
774 snprintf(tmpf, sizeof(tmpf), "pmcstat -R %s -m %s", ofile, in main()
776 if (system(tmpf) != 0) in main()
/freebsd/contrib/dma/
H A Dspool.c93 queue->tmpf = strdup(fn); in newspoolf()
94 if (queue->tmpf == NULL) in newspoolf()
111 t->str = queue->tmpf; in newspoolf()
261 if (link(queue->tmpf, it->mailfn) != 0) in linkspool()
270 unlink(queue->tmpf); in linkspool()
H A Ddma.h126 char *tmpf; member
/freebsd/contrib/elftoolchain/elfcopy/
H A Dmain.c541 char *tmpf; in create_tempfile() local
567 tmpf = malloc(tlen + slen + plen); in create_tempfile()
568 if (tmpf == NULL) in create_tempfile()
571 memcpy(tmpf, tmpdir, tlen); in create_tempfile()
573 tmpf[tlen] = '/'; in create_tempfile()
575 memcpy(tmpf + tlen + slen, _TEMPFILE, plen); in create_tempfile()
576 if ((*fd = mkstemp(tmpf)) != -1) in create_tempfile()
579 err(EXIT_FAILURE, "mkstemp %s failed", tmpf); in create_tempfile()
581 free(tmpf); in create_tempfile()
585 err(EXIT_FAILURE, "fchmod %s failed", tmpf); in create_tempfile()
[all …]
/freebsd/usr.sbin/edquota/
H A Dedquota.c417 editit(char *tmpf) in editit() argument
447 execlp(ed, ed, tmpf, (char *)0); in editit()