Home
last modified time | relevance | path

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

123

/bionic/tests/
Dstdio_test.cpp267 snprintf(buf, sizeof(buf), "%zd", v); in TEST()
273 EXPECT_EQ(23, snprintf(buf, sizeof(buf), "<%a>", 9990.235)); in TEST()
280 EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%lc>", wc)); in TEST()
287 EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%ls>", ws)); in TEST()
292 EXPECT_EQ(4, snprintf(buf, sizeof(buf), "<%ls>", ws)); in TEST()
301 EXPECT_EQ(5, snprintf(buf, sizeof(buf), "a %n b", &i)); in TEST()
312 snprintf(buf, sizeof(buf), "a"); in TEST()
315 snprintf(buf, sizeof(buf), "%%"); in TEST()
318 snprintf(buf, sizeof(buf), "01234"); in TEST()
321 snprintf(buf, sizeof(buf), "a%sb", "01234"); in TEST()
[all …]
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)); \
Dfortify_compilation_test.cpp51 snprintf(buf, 5, "foobar"); // NOLINT(runtime/printf) in test_snprintf()
56 snprintf(buf, 5, "%s", "foobar"); // NOLINT(runtime/printf) in test_snprintf()
61 snprintf(buf, 5, " %s ", "foobar"); // NOLINT(runtime/printf) in test_snprintf()
66 snprintf(buf, 5, "%d", 100000); // NOLINT(runtime/printf) in test_snprintf()
DTemporaryFile.h57 snprintf(filename, sizeof(filename), "%s/TemporaryFile-XXXXXX", tmp_dir); in init()
82 snprintf(dirname, sizeof(dirname), "%s/TemporaryDir-XXXXXX", tmp_dir); in init()
Dsystem_properties_test.cpp36 snprintf(dir_template, sizeof(dir_template), "%s/local/tmp/prop-XXXXXX", ANDROID_DATA); in LocalPropertyTestState()
196 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d", count); in TEST()
198 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d", count); in TEST()
214 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d", i); in TEST()
216 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d", i); in TEST()
288 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d.%d.%d", i, j, k); in TEST()
290 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d.%d.%d", i, j, k); in TEST()
303 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d.%d.%d", i, j, k); in TEST()
305 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d.%d.%d", i, j, k); in TEST()
Dsys_stat_test.cpp176 snprintf(linkname, sizeof(linkname), "%s.link", tf.filename); in TEST()
189 snprintf(linkname, sizeof(linkname), "%s.link", tf.filename); in TEST()
190 snprintf(target, sizeof(target), "%s.doesnotexist", tf.filename); in TEST()
211 snprintf(linkname, sizeof(linkname), "%s.link", tf.filename); in TEST()
233 snprintf(linkname, sizeof(linkname), "%s.link", tf.filename); in TEST()
234 snprintf(target, sizeof(target), "%s.doesnotexist", tf.filename); in TEST()
Dbug_26110743_test.cpp34 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd); in ProcSelfReadlinkBody()
79 snprintf(buf, sizeof(buf), "/proc/%d/task/%d/fd/%d", mypid, mytid, fd); in ProcTaskFdReadlinkBody()
/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.c52 (void)snprintf(s, L_tmpnam, "%stmp.%lu.XXXXXXXXX", P_tmpdir, tmpcount); in tmpnam()
/bionic/libc/bionic/
Dgrp_pwd.cpp110 snprintf(buf, byte_count, "%s%c%s%c%s", src->pw_name, 0, src->pw_dir, 0, src->pw_shell); in do_getpw_r()
139 snprintf(state->name_buffer_, sizeof(state->name_buffer_), "%s", iinfo->name); in android_iinfo_to_passwd()
140 snprintf(state->dir_buffer_, sizeof(state->dir_buffer_), "/"); in android_iinfo_to_passwd()
141 snprintf(state->sh_buffer_, sizeof(state->sh_buffer_), "/system/bin/sh"); in android_iinfo_to_passwd()
154 snprintf(state->group_name_buffer_, sizeof(state->group_name_buffer_), "%s", iinfo->name); in android_iinfo_to_group()
285 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_uid()
289 snprintf(buffer, bufferlen, "u%u_%s", userid, android_ids[n].name); in print_app_name_from_uid()
294 snprintf(buffer, bufferlen, "u%u_a%u", userid, appid - AID_APP_START); in print_app_name_from_uid()
302 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_gid()
304 snprintf(buffer, bufferlen, "all_a%u", appid - AID_SHARED_GID_START); in print_app_name_from_gid()
[all …]
Dicu.cpp75 snprintf(g_icudata_version, sizeof(g_icudata_version), "_%d", max_version); in __find_icu()
91 snprintf(versioned_symbol_name, sizeof(versioned_symbol_name), "%s%s", in __find_icu_symbol()
Dether_ntoa.c40 snprintf(buf, 18, "%02x:%02x:%02x:%02x:%02x:%02x", in ether_ntoa_r()
Dflistxattr.cpp56 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd); in flistxattr()
Dfchmod.cpp61 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd); in fchmod()
Dfsetxattr.cpp56 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd); in fsetxattr()
Dfgetxattr.cpp56 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd); in fgetxattr()
Djemalloc_wrapper.cpp76 snprintf(buffer, sizeof(buffer), "arena.%d.decay_time", i); in je_mallopt()
Dpty.cpp72 if (snprintf(buf, len, "/dev/pts/%u", pty_num) >= static_cast<int>(len)) { in ptsname_r()
98 snprintf(path, sizeof(path), "/proc/self/fd/%d", fd); in ttyname_r()
/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/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/libc/tzcode/
Dasctime.c106 snprintf(result, sizeof(result), /* Android change: use snprintf. */ in asctime_r()

123