Home
last modified time | relevance | path

Searched refs:tmpname (Results 1 – 25 of 27) sorted by relevance

12

/external/python/cpython3/Lib/test/
Dtest_tarfile.py38 tmpname = os.path.join(TEMPDIR, "tmp.tar") variable
324 with tarfile.open(tmpname, self.mode.replace("r", "w")):
327 tar = tarfile.open(tmpname, self.mode)
346 with open(tmpname, "wb"):
348 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname, self.mode)
349 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname)
358 with self.open(tmpname, "w") as fobj:
365 tar = tarfile.open(tmpname, mode="r", ignore_zeros=True)
375 with tarfile.open(tmpname, "w:") as tar:
380 with open(tmpname, "r+b") as fobj:
[all …]
Dtest_mailbox.py2133 tmpname = os.path.join(self._dir, "tmp", filename)
2135 with open(tmpname, "w") as fp:
2136 self._msgfiles.append(tmpname)
2141 os.link(tmpname, newname)
2146 return tmpname
/external/dtc/
Dfstree.c40 char *tmpname; in read_fstree() local
46 tmpname = join_path(dirname, de->d_name); in read_fstree()
48 if (lstat(tmpname, &st) < 0) in read_fstree()
49 die("stat(%s): %s\n", tmpname, strerror(errno)); in read_fstree()
55 pfile = fopen(tmpname, "rb"); in read_fstree()
59 tmpname, strerror(errno)); in read_fstree()
70 newchild = read_fstree(tmpname); in read_fstree()
75 free(tmpname); in read_fstree()
/external/elfutils/config/
DMakefile.am39 @tmpname=$$(mktemp $${TMPDIR:-/tmp}/elfutils.XXXXXX); \
40 date +'* %a %b %e %Y' | tr '[\n]' '[ ]' > $$tmpname; \
42 awk 'BEGIN {FS=":"} { printf $$5; exit 0}' >> $$tmpname; \
43 echo -n " <$$(whoami)@gmail.com> " >> $$tmpname; \
51 | fold -s -w 70 | sed '1!s/^[^-]/ &/' >> $$tmpname; \
52 sed "/^%changelog/r $$tmpname" $@ > $@.new; \
53 rm -f $$tmpname; \
/external/python/cpython2/Lib/test/
Dtest_tarfile.py34 tmpname = os.path.join(TEMPDIR, "tmp.tar") variable
243 with tarfile.open(tmpname, self.mode.replace("r", "w")):
246 tar = tarfile.open(tmpname, self.mode)
259 with open(tmpname, "wb"):
261 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname, self.mode)
262 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname)
286 with _open(tmpname, "wb") as fobj:
293 tar = tarfile.open(tmpname, mode="r", ignore_zeros=True)
302 with tarfile.open(tmpname, "w:") as tar:
307 with open(tmpname, "r+b") as fobj:
[all …]
Dtest_old_mailbox.py49 tmpname = os.path.join(self._dir, "tmp", filename)
51 with open(tmpname, "w") as fp:
52 self._msgfiles.append(tmpname)
57 os.link(tmpname, newname)
62 return tmpname
Dtest_mailbox.py1953 tmpname = os.path.join(self._dir, "tmp", filename)
1955 with open(tmpname, "w") as fp:
1956 self._msgfiles.append(tmpname)
1961 os.link(tmpname, newname)
1966 return tmpname
/external/ltp/testcases/kernel/mem/mmapstress/
Dmmapstress07.c43 static char *tmpname; variable
50 (void)unlink(tmpname); \
81 (void)unlink(tmpname); in cleanup()
118 tmpname = argv[1];
153 if ((rofd = open64(tmpname, O_RDONLY | O_CREAT, 0777)) == -1) {
155 if ((rofd = open(tmpname, O_RDONLY | O_CREAT, 0777)) == -1) {
161 if ((rwfd = open64(tmpname, O_RDWR)) == -1) {
163 if ((rwfd = open(tmpname, O_RDWR)) == -1) {
288 if (unlink(tmpname) == -1) {
Dmmapstress02.c44 #define CLEANERROR(M) (void)unlink(tmpname); ERROR(M)
51 static char tmpname[] = "fileXXXXXX"; variable
75 (void)unlink(tmpname); in cleanup()
98 if ((fd = mkstemp(tmpname)) == -1) { in main()
166 if (unlink(tmpname) == -1) { in main()
Dmmapstress05.c71 if (unlink(tmpname)) { \
89 static char tmpname[] = "fileXXXXXX"; variable
100 (void)unlink(tmpname); in cleanup()
140 if ((fd = mkstemp(tmpname)) == -1) { in main()
/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl15.c73 static char tmpname[40]; variable
109 if ((fd_B = open(tmpname, file_flag, file_mode)) < 0) { in dochild1()
196 parent, tmpname) < 0) { in dofork()
246 if ((fd_C = open(tmpname, file_flag, file_mode)) < 0) { in dochild2()
379 sprintf(tmpname, "fcntl15.%d", parent); in run_test()
384 if ((fd_A = open(tmpname, file_flag, file_mode)) < 0) { in run_test()
397 if ((fd_B = open(tmpname, file_flag, file_mode)) < 0) { in run_test()
451 dup_flag, parent, tmpname) < 0) in run_test()
520 unlink(tmpname); in run_test()
532 &uc_file_mode, &parent, tmpname); in main()
[all …]
Dfcntl16.c273 static char tmpname[40]; variable
420 sprintf(tmpname, "fcntl4.%d", parent); in setup()
455 fd = SAFE_OPEN(cleanup, tmpname, file_flag, file_mode); in run_test()
470 unlink(tmpname); in run_test()
484 unlink(tmpname); in run_test()
555 unlink(tmpname); in run_test()
569 unlink(tmpname); in run_test()
642 unlink(tmpname); in run_test()
Dfcntl14.c539 static char tmpname[40]; variable
570 sprintf(tmpname, "fcntl2.%d", parent); in setup()
782 fd = SAFE_OPEN(cleanup, tmpname, file_flag, file_mode); in run_test()
899 unlink(tmpname); in run_test()
1018 fd = SAFE_OPEN(cleanup, tmpname, O_CREAT | O_RDWR | O_TRUNC, in main()
1042 unlink(tmpname); in main()
1055 fd = SAFE_OPEN(cleanup, tmpname, O_CREAT | O_RDWR | O_TRUNC, in main()
1150 unlink(tmpname); in main()
/external/compiler-rt/test/asan/android_commands/
Dandroid_common.py14 tmpname = tempfile.mktemp()
15 out = open(tmpname, 'w')
24 print tmpname
26 out = open(tmpname, 'r')
29 os.unlink(tmpname)
/external/wayland/cursor/
Dos-compatibility.c63 create_tmpfile_cloexec(char *tmpname) in create_tmpfile_cloexec() argument
68 fd = mkostemp(tmpname, O_CLOEXEC); in create_tmpfile_cloexec()
70 unlink(tmpname); in create_tmpfile_cloexec()
72 fd = mkstemp(tmpname); in create_tmpfile_cloexec()
75 unlink(tmpname); in create_tmpfile_cloexec()
/external/libmtp/src/
Dplaylist-spl.c136 char tmpname[] = "/tmp/mtp-spl2pl-XXXXXX"; in spl_to_playlist_t() local
137 int fd = mkstemp(tmpname); in spl_to_playlist_t()
139 …LIBMTP_ERROR("failed to make temp file for %s.spl -> %s, errno=%s\n", pl->name, tmpname, strerror(… in spl_to_playlist_t()
143 if(unlink(tmpname) < 0) in spl_to_playlist_t()
144 …LIBMTP_ERROR("failed to delete temp file for %s.spl -> %s, errno=%s\n", pl->name, tmpname, strerro… in spl_to_playlist_t()
191 char tmpname[] = "/tmp/mtp-spl2pl-XXXXXX"; // must be a var since mkstemp modifies it in playlist_t_to_spl() local
196 int fd = mkstemp(tmpname); in playlist_t_to_spl()
198 …LIBMTP_ERROR("failed to make temp file for %s.spl -> %s, errno=%s\n", pl->name, tmpname, strerror(… in playlist_t_to_spl()
202 if(unlink(tmpname) < 0) in playlist_t_to_spl()
203 …LIBMTP_ERROR("failed to delete temp file for %s.spl -> %s, errno=%s\n", pl->name, tmpname, strerro… in playlist_t_to_spl()
/external/ltp/testcases/kernel/fs/ftest/
Dftest02.c87 static char tmpname[MAXPATHLEN]; variable
127 sprintf(tmpname, "/ftest02.%d", getpid()); in main()
128 strcat(dirname, tmpname); in main()
130 sprintf(tmpname, "/ftest02h.%d", getpid()); in main()
131 strcat(homedir, tmpname); in main()
/external/libpcap/
Dpcap-new.c749 char tmpname[PCAP_BUF_SIZE]; in pcap_parsesrcstr() local
755 tmpname[0] = 0; in pcap_parsesrcstr()
781 ntoken = sscanf(ptr, "[%[1234567890:.]]:%[^/]/%s", tmphost, tmpport, tmpname); in pcap_parsesrcstr()
784 ntoken = sscanf(ptr, "[%[1234567890:.]]/%s", tmphost, tmpname); in pcap_parsesrcstr()
790 ntoken = sscanf(ptr, "%[^/:]:%[^/]/%s", tmphost, tmpport, tmpname); in pcap_parsesrcstr()
803 sscanf(ptr, "%[^/]/%s", tmphost, tmpname); in pcap_parsesrcstr()
810 strlcpy(tmpname, ptr, PCAP_BUF_SIZE); in pcap_parsesrcstr()
837 if (tmpname[0]) in pcap_parsesrcstr()
839 strlcpy(name, tmpname, PCAP_BUF_SIZE); in pcap_parsesrcstr()
/external/toybox/kconfig/
Dconfdata.c403 char dirname[128], tmpname[128], newname[128]; in conf_write() local
435 sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()); in conf_write()
436 out = fopen(tmpname, "w"); in conf_write()
438 *tmpname = 0; in conf_write()
558 if (*tmpname) { in conf_write()
562 if (rename(tmpname, newname)) in conf_write()
/external/vboot_reference/cgpt/
Dcgpt_find.c182 char tmpname[BUFSIZE]; in is_wholedev() local
195 sprintf(tmpname, "%s/%s/device", SYS_BLOCK_DIR, basename); in is_wholedev()
197 if (0 != lstat(tmpname, &statbuf)) in is_wholedev()
/external/valgrind/coregrind/m_debuginfo/
Dreadpdb.c2489 HChar tmpname[VG_(mkstemp_fullname_bufsz)(sizeof tmpnameroot - 1)]; in ML_() local
2499 VG_(memset)(tmpname, 0, sizeof(tmpname)); in ML_()
2500 fd = VG_(mkstemp)( tmpnameroot, tmpname ); in ML_()
2503 "Find PDB file: Can't create temporary file %s\n", tmpname); in ML_()
2517 + VG_(strlen)(egrep) + VG_(strlen)(tmpname) in ML_()
2521 sh, strings, pename, egrep, tmpname); in ML_()
2536 SysRes sr = VG_(stat)(tmpname, &stat_buf); in ML_()
2538 VG_(umsg)("LOAD_PDB_DEBUGINFO: Find PDB file: can't stat %s\n", tmpname); in ML_()
2544 VG_(umsg)("LOAD_PDB_DEBUGINFO: Find PDB file: %s is empty\n", tmpname); in ML_()
2550 tmpname, szB); in ML_()
[all …]
/external/libpng/contrib/tools/
Dpngcp.c2225 char *tmpname, tmpbuf[(sizeof dp->namebuf) + 4]; in cp_one_file() local
2237 tmpname = tmpbuf; in cp_one_file()
2241 tmpname = NULL; /* stdout */ in cp_one_file()
2246 write_png(dp, tmpname); in cp_one_file()
2256 if (destname != NULL && rename(tmpname, destname) != 0) in cp_one_file()
2257 display_log(dp, APP_ERROR, "rename %s %s failed (%s)", tmpname, in cp_one_file()
2264 else if (tmpname != NULL && unlink(tmpname) != 0) in cp_one_file()
2265 display_log(dp, APP_WARNING, "unlink %s failed (%s)", tmpname, in cp_one_file()
/external/mesa3d/src/egl/drivers/dri2/
Dplatform_wayland.c1331 create_tmpfile_cloexec(char *tmpname) in create_tmpfile_cloexec() argument
1336 fd = mkostemp(tmpname, O_CLOEXEC); in create_tmpfile_cloexec()
1338 unlink(tmpname); in create_tmpfile_cloexec()
1340 fd = mkstemp(tmpname); in create_tmpfile_cloexec()
1343 unlink(tmpname); in create_tmpfile_cloexec()
/external/python/cpython2/Python/
Dsymtable.c1482 char tmpname[256]; in symtable_new_tmpname() local
1485 PyOS_snprintf(tmpname, sizeof(tmpname), "_[%d]", in symtable_new_tmpname()
1487 tmp = PyString_InternFromString(tmpname); in symtable_new_tmpname()
/external/python/cpython3/Python/
Dsymtable.c1090 char tmpname[256]; in symtable_new_tmpname() local
1093 PyOS_snprintf(tmpname, sizeof(tmpname), "_[%d]", in symtable_new_tmpname()
1095 tmp = PyUnicode_InternFromString(tmpname); in symtable_new_tmpname()

12