Home
last modified time | relevance | path

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

123

/bionic/tests/
Dstdio_test.cpp239 snprintf(buf, sizeof(buf), "%zd", v); in TEST()
245 EXPECT_EQ(23, snprintf(buf, sizeof(buf), "<%a>", 9990.235)); in TEST()
252 EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%lc>", wc)); in TEST()
259 EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%ls>", ws)); in TEST()
264 EXPECT_EQ(4, snprintf(buf, sizeof(buf), "<%ls>", ws)); in TEST()
273 EXPECT_EQ(5, snprintf(buf, sizeof(buf), "a %n b", &i)); in TEST()
284 snprintf(buf, sizeof(buf), "a"); in TEST()
287 snprintf(buf, sizeof(buf), "%%"); in TEST()
290 snprintf(buf, sizeof(buf), "01234"); in TEST()
293 snprintf(buf, sizeof(buf), "a%sb", "01234"); in TEST()
[all …]
Dinttypes_test.cpp29 snprintf(buf, sizeof(buf), "%08" PRIdPTR, i); in TEST()
30 snprintf(buf, sizeof(buf), "%08" PRIiPTR, i); in TEST()
31 snprintf(buf, sizeof(buf), "%08" PRIoPTR, i); in TEST()
32 snprintf(buf, sizeof(buf), "%08" PRIuPTR, u); in TEST()
33 snprintf(buf, sizeof(buf), "%08" PRIxPTR, u); in TEST()
34 snprintf(buf, sizeof(buf), "%08" PRIXPTR, u); in TEST()
Dfortify_compilation_test.cpp50 snprintf(buf, 5, "foobar"); // NOLINT(runtime/printf) in test_snprintf()
55 snprintf(buf, 5, "%s", "foobar"); // NOLINT(runtime/printf) in test_snprintf()
60 snprintf(buf, 5, " %s ", "foobar"); // NOLINT(runtime/printf) in test_snprintf()
65 snprintf(buf, 5, "%d", 100000); // NOLINT(runtime/printf) in test_snprintf()
Dftw_test.cpp32 snprintf(path, sizeof(path), "%s/dir", root); in MakeTree()
34 snprintf(path, sizeof(path), "%s/dir/sub", root); in MakeTree()
36 snprintf(path, sizeof(path), "%s/unreadable-dir", root); in MakeTree()
39 snprintf(path, sizeof(path), "%s/dangler", root); in MakeTree()
41 snprintf(path, sizeof(path), "%s/symlink", root); in MakeTree()
45 snprintf(path, sizeof(path), "%s/regular", root); in MakeTree()
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()
192 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d", count); in TEST()
194 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d", count); in TEST()
210 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d", i); in TEST()
212 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d", i); in TEST()
279 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d.%d.%d", i, j, k); in TEST()
281 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d.%d.%d", i, j, k); in TEST()
294 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d.%d.%d", i, j, k); in TEST()
296 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()
Dutils.h42 snprintf(path, sizeof(path), "/proc/self/task/%d/maps", getpid()); in parse_maps()
/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dtempnam.c57 len = snprintf(name, PATH_MAX, "%s%s%sXXXXXXXXXX", f, in tempnam()
69 len = snprintf(name, PATH_MAX, "%s%s%sXXXXXXXXXX", f, in tempnam()
80 len = snprintf(name, PATH_MAX, "%s%sXXXXXXXXX", f, pfx); in tempnam()
89 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/
Dstubs.cpp111 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()
278 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_uid()
282 snprintf(buffer, bufferlen, "u%u_%s", userid, android_ids[n].name); in print_app_name_from_uid()
287 snprintf(buffer, bufferlen, "u%u_a%u", userid, appid - AID_APP); in print_app_name_from_uid()
295 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_gid()
297 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()
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()
Dpthread_setname_np.cpp67 snprintf(comm_name, sizeof(comm_name), TASK_COMM_FMT, tid); in pthread_setname_np()
Dpty.cpp74 if (snprintf(buf, len, "/dev/pts/%u", pty_num) >= static_cast<int>(len)) { in ptsname_r()
99 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/stdio/
Dsnprintf.c42 snprintf(char *str, size_t n, const char *fmt, ...) in snprintf() function
/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 (void) snprintf(result, sizeof(result), /* Android change: use snprintf. */ in asctime_r()
/bionic/libc/include/
Dstdio.h301 int snprintf(char * __restrict, size_t, const char * __restrict, ...)
402 #if !defined(snprintf)
404 #define snprintf(...) __wrap_snprintf(__VA_ARGS__) macro
409 int snprintf(char *dest, size_t size, const char *format, ...) in snprintf() function

123