Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 13 of 13) sorted by relevance

/support/
A Dxreadlink.c27 struct scratch_buffer buf; in xreadlink() local
28 scratch_buffer_init (&buf); in xreadlink()
32 ssize_t count = readlink (path, buf.data, buf.length); in xreadlink()
35 if (count < buf.length) in xreadlink()
37 char *result = xstrndup (buf.data, count); in xreadlink()
38 scratch_buffer_free (&buf); in xreadlink()
41 if (!scratch_buffer_grow (&buf)) in xreadlink()
A Dsupport_become_root.c46 char buf[100]; in setup_uid_gid_mapping() local
47 int ret = snprintf (buf, sizeof (buf), "%llu %llu 1\n", in setup_uid_gid_mapping()
50 TEST_VERIFY_EXIT (ret < sizeof (buf)); in setup_uid_gid_mapping()
51 xwrite (fd, buf, ret); in setup_uid_gid_mapping()
72 ret = snprintf (buf, sizeof (buf), "%llu %llu 1\n", in setup_uid_gid_mapping()
75 TEST_VERIFY_EXIT (ret < sizeof (buf)); in setup_uid_gid_mapping()
76 xwrite (fd, buf, ret); in setup_uid_gid_mapping()
A Dtst-support-namespace.c72 int buf; in test_localhost_bind() local
73 TEST_VERIFY (recv (sockets[i], &buf, sizeof (buf), 0) == sizeof (buf)); in test_localhost_bind()
74 TEST_VERIFY (buf == i); in test_localhost_bind()
78 int buf; in test_localhost_bind() local
79 TEST_VERIFY (recv (sockets[i], &buf, sizeof (buf), 0) == sizeof (buf)); in test_localhost_bind()
80 TEST_VERIFY (buf == i + 256); in test_localhost_bind()
82 TEST_VERIFY (recv (sockets[i], &buf, sizeof (buf), MSG_DONTWAIT) == -1); in test_localhost_bind()
A Dsupport_copy_file_range.c71 char buf[8192]; in support_copy_file_range() local
75 if (to_read > sizeof (buf)) in support_copy_file_range()
76 to_read = sizeof (buf); in support_copy_file_range()
81 read_count = read (infd, buf, to_read); in support_copy_file_range()
83 read_count = pread64 (infd, buf, to_read, *pinoff); in support_copy_file_range()
98 char *end = buf + read_count; in support_copy_file_range()
99 for (char *p = buf; p < end; ) in support_copy_file_range()
111 size_t written = p - buf; in support_copy_file_range()
A Dsupport_openpty.c39 char *buf = xmalloc (buf_len); in xptsname() local
42 rv = ptsname_r (fd, buf, buf_len); in xptsname()
46 if (memchr (buf, '\0', buf_len)) in xptsname()
47 return buf; /* ptsname succeeded and the buffer was not truncated */ in xptsname()
50 buf = xrealloc (buf, buf_len); in xptsname()
A Dxrecvfrom.c26 xrecvfrom (int fd, void *buf, size_t buflen, int flags, in xrecvfrom() argument
29 ssize_t ret = recvfrom (fd, buf, buflen, flags, sa, salen); in xrecvfrom()
A Dxsendto.c26 xsendto (int fd, const void *buf, size_t buflen, int flags, in xsendto() argument
29 ssize_t ret = sendto (fd, buf, buflen, flags, sa, salen); in xsendto()
A Dsupport_format_hostent.c65 char buf[128]; in support_format_hostent() local
67 buf, sizeof (buf)) == NULL) in support_format_hostent()
70 fprintf (mem.out, "address: %s\n", buf); in support_format_hostent()
A Dsupport_capture_subprocess.c37 char buf[1024]; in transfer() local
38 ssize_t ret = TEMP_FAILURE_RETRY (read (pfd->fd, buf, sizeof (buf))); in transfer()
54 TEST_VERIFY (fwrite (buf, ret, 1, stream->out) == 1); in transfer()
134 char buf[4096]; in copy_and_spawn_sgid() local
137 ssize_t rdcount = read (infd, buf, sizeof (buf)); in copy_and_spawn_sgid()
143 char *p = buf; in copy_and_spawn_sgid()
144 char *end = buf + rdcount; in copy_and_spawn_sgid()
147 ssize_t wrcount = write (outfd, buf, end - p); in copy_and_spawn_sgid()
A Dtest-container.c322 char *buf; member
338 if (pb->buf == NULL) in r_setup()
341 pb->buf = (char *) xrealloc (pb->buf, sz); in r_setup()
342 if (pb->buf == NULL) in r_setup()
347 strcpy (pb->buf, path); in r_setup()
359 pb->buf = (char *) xrealloc (pb->buf, sz); in r_append()
360 if (pb->buf == NULL) in r_append()
494 printf ("sync %s to %s%s%s\n", src->buf, dest->buf, in rsync_1()
525 if (! force_copies && ! need_sync (src->buf, dest->buf, &s, &d)) in rsync_1()
556 copy_one_file (src->buf, dest->buf); in rsync_1()
[all …]
A Dsupport_format_addrinfo.c170 char buf[128]; in format_ai_one() local
178 ret = inet_ntop (AF_INET, &sin->sin_addr, buf, sizeof (buf)); in format_ai_one()
185 ret = inet_ntop (AF_INET6, &sin->sin6_addr, buf, sizeof (buf)); in format_ai_one()
196 fprintf (out, " %s %u\n", buf, ntohs (port)); in format_ai_one()
A Dsupport_format_dns_packet.c197 char buf[100]; in support_format_dns_packet() local
198 if (inet_ntop (AF_INET6, rdata.data, buf, sizeof (buf)) == NULL) in support_format_dns_packet()
201 fprintf (mem.out, "address: %s\n", buf); in support_format_dns_packet()
A Dresolv_test.c803 read_fully (int fd, void *buf, size_t len, bool eof_ok) in read_fully() argument
805 const void *const end = buf + len; in read_fully()
806 while (buf < end) in read_fully()
808 ssize_t ret = read (fd, buf, end - buf); in read_fully()
827 buf += ret; in read_fully()
1213 char buf[256]; in resolv_test_start() local
1216 buf, sizeof (buf)) != NULL); in resolv_test_start()
1218 server_index, buf, in resolv_test_start()

Completed in 25 milliseconds