Home
last modified time | relevance | path

Searched refs:snprintf (Results 1 – 25 of 48) sorted by relevance

12

/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dtempnam.c55 len = snprintf(name, PATH_MAX, "%s%s%sXXXXXXXXXX", f, in tempnam()
67 len = snprintf(name, PATH_MAX, "%s%s%sXXXXXXXXXX", f, in tempnam()
78 len = snprintf(name, PATH_MAX, "%s%sXXXXXXXXX", f, pfx); in tempnam()
87 len = snprintf(name, PATH_MAX, "%s%sXXXXXXXXX", f, pfx); in tempnam()
Dtmpnam.c50 (void)snprintf(s, L_tmpnam, "%stmp.%lu.XXXXXXXXX", P_tmpdir, tmpcount); in tmpnam()
/bionic/tests/
Dstdio_test.cpp279 snprintf(buf, sizeof(buf), "%zd", v); in TEST()
285 EXPECT_EQ(23, snprintf(buf, sizeof(buf), "<%a>", 9990.235)); in TEST()
292 EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%lc>", wc)); in TEST()
299 EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%C>", wc)); in TEST()
306 EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%ls>", ws)); in TEST()
311 EXPECT_EQ(4, snprintf(buf, sizeof(buf), "<%ls>", ws)); in TEST()
318 EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%S>", ws)); in TEST()
323 EXPECT_EQ(4, snprintf(buf, sizeof(buf), "<%S>", ws)); in TEST()
332 EXPECT_DEATH(snprintf(buf, sizeof(buf), "a %n b", &i), "%n not allowed on Android"); in TEST()
341 snprintf(buf, sizeof(buf), "a"); in TEST()
[all …]
Dfortify_filecheck_diagnostics_test.cpp62 snprintf(buf, 5, "foobar"); // NOLINT(runtime/printf) in test_snprintf()
65 snprintf(buf, 5, "%s", "foobar"); // NOLINT(runtime/printf) in test_snprintf()
68 snprintf(buf, 5, " %s ", "foobar"); // NOLINT(runtime/printf) in test_snprintf()
71 snprintf(buf, 5, "%d", 100000); // NOLINT(runtime/printf) in test_snprintf()
Dftw_test.cpp34 snprintf(path, sizeof(path), "%s/dir", root); in MakeTree()
36 snprintf(path, sizeof(path), "%s/dir/sub", root); in MakeTree()
38 snprintf(path, sizeof(path), "%s/unreadable-dir", root); in MakeTree()
41 snprintf(path, sizeof(path), "%s/dangler", root); in MakeTree()
43 snprintf(path, sizeof(path), "%s/symlink", root); in MakeTree()
47 snprintf(path, sizeof(path), "%s/regular", root); in MakeTree()
Dinttypes_test.cpp27 snprintf(buf, sizeof(buf), "%" PRId##FMT_SUFFIX, int##TYPE_SUFFIX(123)); \
30 snprintf(buf, sizeof(buf), "%" PRIi##FMT_SUFFIX, int##TYPE_SUFFIX(123)); \
33 snprintf(buf, sizeof(buf), "%" PRIo##FMT_SUFFIX, int##TYPE_SUFFIX(123)); \
36 snprintf(buf, sizeof(buf), "%" PRIu##FMT_SUFFIX, uint##TYPE_SUFFIX(123)); \
39 snprintf(buf, sizeof(buf), "%" PRIx##FMT_SUFFIX, uint##TYPE_SUFFIX(123)); \
42 snprintf(buf, sizeof(buf), "%" PRIX##FMT_SUFFIX, uint##TYPE_SUFFIX(123)); \
Dsys_stat_test.cpp175 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
188 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
189 snprintf(target, sizeof(target), "%s.doesnotexist", tf.path); in TEST()
210 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
232 snprintf(linkname, sizeof(linkname), "%s.link", tf.path); in TEST()
233 snprintf(target, sizeof(target), "%s.doesnotexist", tf.path); in TEST()
Dbug_26110743_test.cpp36 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd); in ProcSelfReadlinkBody()
82 snprintf(buf, sizeof(buf), "/proc/%d/task/%d/fd/%d", mypid, mytid, fd); in ProcTaskFdReadlinkBody()
Dsystem_properties_test.cpp175 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d", count); in TEST()
177 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d", count); in TEST()
193 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d", i); in TEST()
195 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d", i); in TEST()
268 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d.%d.%d", i, j, k); in TEST()
270 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d.%d.%d", i, j, k); in TEST()
284 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d.%d.%d", i, j, k); in TEST()
286 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d.%d.%d", i, j, k); in TEST()
/bionic/libc/dns/nameser/
Dns_print.c152 len = snprintf(tmp, sizeof(tmp), " %s %s", p_class(class), p_type(type)); in ns_sprintrrf()
215 len = snprintf(tmp, sizeof(tmp), "%lu", t); in ns_sprintrrf()
272 len = snprintf(tmp, sizeof(tmp), "%u ", t); in ns_sprintrrf()
290 len = snprintf(tmp, sizeof(tmp), "%u ", t); in ns_sprintrrf()
356 len = snprintf(t, sizeof(t), "%u %u ", order, preference); in ns_sprintrrf()
398 len = snprintf(t, sizeof(t), "%u %u %u ", priority, weight, port); in ns_sprintrrf()
429 len = snprintf(tmp, sizeof(tmp), " %u ( ", *rdata); in ns_sprintrrf()
446 len = snprintf(tmp, sizeof(tmp), "%d ", n); in ns_sprintrrf()
477 len = snprintf(tmp, sizeof(tmp), "0x%04x %u %u", in ns_sprintrrf()
499 n = snprintf(tmp, sizeof(tmp), " ; key_tag= %u", key_id); in ns_sprintrrf()
[all …]
/bionic/libc/bionic/
Dgrp_pwd.cpp113 snprintf(buf, byte_count, "%s%c%s%c%s", src->pw_name, 0, src->pw_dir, 0, src->pw_shell); in do_getpw_r()
142 snprintf(state->name_buffer_, sizeof(state->name_buffer_), "%s", iinfo->name); in android_iinfo_to_passwd()
143 snprintf(state->dir_buffer_, sizeof(state->dir_buffer_), "/"); in android_iinfo_to_passwd()
144 snprintf(state->sh_buffer_, sizeof(state->sh_buffer_), "/system/bin/sh"); in android_iinfo_to_passwd()
157 snprintf(state->group_name_buffer_, sizeof(state->group_name_buffer_), "%s", iinfo->name); in android_iinfo_to_group()
371 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_uid()
375 snprintf(buffer, bufferlen, "u%u_%s", userid, android_ids[n].name); in print_app_name_from_uid()
380 snprintf(buffer, bufferlen, "u%u_a%u", userid, appid - AID_APP_START); in print_app_name_from_uid()
388 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_gid()
390 snprintf(buffer, bufferlen, "all_a%u", appid - AID_SHARED_GID_START); in print_app_name_from_gid()
[all …]
Dether_ntoa.c40 snprintf(buf, 18, "%02x:%02x:%02x:%02x:%02x:%02x", in ether_ntoa_r()
Dicu.cpp57 snprintf(versioned_symbol_name, sizeof(versioned_symbol_name), "%s_android", in __find_icu_symbol()
Djemalloc_wrapper.cpp95 snprintf(buffer, sizeof(buffer), "arena.%d.dirty_decay_ms", i); in je_mallopt()
99 snprintf(buffer, sizeof(buffer), "arena.%d.muzzy_decay_ms", i); in je_mallopt()
119 snprintf(buffer, sizeof(buffer), "arena.%u.purge", narenas); in je_mallopt()
Dstrsignal.cpp58 size_t length = snprintf(buf, buf_len, "%s signal %d", prefix, signal_number); in __strsignal()
Dbionic_systrace.cpp68 size_t len = snprintf(buf, length + WRITE_OFFSET, "B|%d|%s", getpid(), message); in bionic_trace_begin()
Dpthread_setname_np.cpp47 snprintf(comm_name, sizeof(comm_name), "/proc/self/task/%d/comm", in __open_task_comm_fd()
/bionic/libc/private/
DFdPath.h22 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd); in FdPath()
/bionic/libc/upstream-openbsd/lib/libc/net/
Dinet_ntoa.c48 (void)snprintf(b, sizeof(b), in inet_ntoa()
Dinet_ntop.c77 l = snprintf(tmp, sizeof(tmp), "%u.%u.%u.%u", in inet_ntop4()
175 advance = snprintf(tp, ep - tp, "%x", words[i]); in inet_ntop6()
/bionic/libc/upstream-netbsd/lib/libc/regex/
Dregerror.c188 (void)snprintf(convbuf, sizeof convbuf, in regerror()
221 (void)snprintf(localbuf, buflen, "%d", r->code); in regatoi()
/bionic/libc/dns/resolv/
Dres_debug.c583 snprintf(unname, sizeof(unname), "%d", number); /* XXX nonreentrant */ in sym_ntos()
600 snprintf(unname, sizeof(unname), "%d", number); /* XXX nonreentrant */ in sym_ntop()
620 snprintf(typebuf, sizeof(typebuf), "TYPE%d", type); in p_type()
656 snprintf(classbuf, sizeof(classbuf), "CLASS%d", class); in p_class()
698 default: snprintf(nbuf, sizeof(nbuf), "?0x%lx?", (u_long)option); in p_option()
711 snprintf(nbuf, sizeof(nbuf), "%u", value); in p_time()
740 snprintf(ret, sizeof(ret), "[af%d]", u.sin.sin_family); in p_sockun()
772 (void) snprintf(retbuf, sizeof(retbuf), "%lu.%.2lu", val/100, val%100); in precsize_ntoa()
1050 (void) snprintf(ascii, bufsiz, "; error: unknown LOC RR version"); in loc_ntoa()
1109 snprintf(ascii, bufsiz, in loc_ntoa()
[all …]
/bionic/benchmarks/
Dstdio_benchmark.cpp179 snprintf(buf, sizeof(buf), "this is just a literal string with no format specifiers"); in BM_stdio_printf_literal()
187 snprintf(buf, sizeof(buf), "this is a more typical error message with detail: %s", in BM_stdio_printf_s()
196 snprintf(buf, sizeof(buf), "this is a more typical error message with detail: %d", 123456); in BM_stdio_printf_d()
204 snprintf(buf, sizeof(buf), "this is a more typical error message with detail: %1$s", in BM_stdio_printf_1$s()
/bionic/libc/tzcode/
Dasctime.c106 snprintf(result, sizeof(result), /* Android change: use snprintf. */ in asctime_r()
/bionic/libc/include/bits/fortify/
Dstdio.h58 int snprintf(char* dest, size_t size, const char* format)
66 int snprintf(char* const __pass_object_size dest, size_t size, const char* format, ...) in snprintf() function

12