Home
last modified time | relevance | path

Searched refs:bufsize (Results 1 – 25 of 495) sorted by relevance

12345678910>>...20

/freebsd/tests/sys/fs/fusefs/
H A Dread.cc172 ssize_t bufsize = strlen(CONTENTS); in TEST_F() local
173 uint8_t buf[bufsize]; in TEST_F()
176 expect_lookup(RELPATH, ino, bufsize); in TEST_F()
178 expect_read(ino, 0, bufsize, bufsize, CONTENTS); in TEST_F()
183 iocb.aio_nbytes = bufsize; in TEST_F()
189 ASSERT_EQ(bufsize, aio_waitcomplete(&piocb, NULL)) << strerror(errno); in TEST_F()
190 ASSERT_EQ(0, memcmp(buf, CONTENTS, bufsize)); in TEST_F()
205 ssize_t bufsize = 50; in TEST_F() local
206 char buf0[bufsize], buf1[bufsize]; in TEST_F()
247 iocb0.aio_nbytes = bufsize; in TEST_F()
[all …]
H A Dwrite.cc243 ssize_t bufsize = strlen(CONTENTS); in TEST_F() local
248 expect_write(ino, offset, bufsize, bufsize, CONTENTS); in TEST_F()
253 iocb.aio_nbytes = bufsize; in TEST_F()
259 ASSERT_EQ(bufsize, aio_waitcomplete(&piocb, NULL)) << strerror(errno); in TEST_F()
367 ssize_t bufsize = strlen(CONTENTS0) + 1; in TEST_F() local
368 char readbuf[bufsize]; in TEST_F()
370 expect_lookup(RELPATH, ino, bufsize); in TEST_F()
372 expect_read(ino, 0, bufsize, bufsize, CONTENTS0); in TEST_F()
373 expect_write(ino, 0, bufsize, bufsize, CONTENTS1); in TEST_F()
379 ASSERT_EQ(bufsize, read(fd, readbuf, bufsize)) << strerror(errno); in TEST_F()
[all …]
H A Dfsync.cc99 ssize_t bufsize = strlen(CONTENTS); in TEST_F() local
106 expect_write(ino, bufsize, CONTENTS); in TEST_F()
111 ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); in TEST_F()
133 ssize_t bufsize = strlen(CONTENTS); in TEST_F() local
139 expect_write(ino, bufsize, CONTENTS); in TEST_F()
160 ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); in TEST_F()
169 ssize_t bufsize = strlen(CONTENTS); in TEST_F() local
175 expect_write(ino, bufsize, CONTENTS); in TEST_F()
180 ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); in TEST_F()
197 ssize_t bufsize = strlen(CONTENTS); in TEST_F() local
[all …]
/freebsd/contrib/llvm-project/clang/lib/Headers/
H A Dhexagon_circ_brev_intrinsics.h22 #define Q6_circ_load_update_D(dest,ptr,incr,bufsize,K) \ argument
23 … { ptr = (int64_t *) HEXAGON_circ_ldd (ptr, &(dest), ((((K)+1)<<24)|((bufsize)<<3)), ((incr)*8)); }
31 #define Q6_circ_load_update_W(dest,ptr,incr,bufsize,K) \ argument
32 { ptr = (int *) HEXAGON_circ_ldw (ptr, &(dest), (((K)<<24)|((bufsize)<<2)), ((incr)*4)); }
40 #define Q6_circ_load_update_H(dest,ptr,incr,bufsize,K) \ argument
41 … { ptr = (int16_t *) HEXAGON_circ_ldh (ptr, &(dest), ((((K)-1)<<24)|((bufsize)<<1)), ((incr)*2)); }
49 #define Q6_circ_load_update_UH(dest,ptr,incr,bufsize,K) \ argument
50 …{ ptr = (uint16_t *) HEXAGON_circ_lduh (ptr, &(dest), ((((K)-1)<<24)|((bufsize)<<1)), ((incr)*2));…
58 #define Q6_circ_load_update_B(dest,ptr,incr,bufsize,K) \ argument
59 { ptr = (int8_t *) HEXAGON_circ_ldb (ptr, &(dest), ((((K)-2)<<24)|(bufsize)), incr); }
[all …]
/freebsd/sys/dev/sound/pcm/
H A Dbuffer.c99 b->bufsize = b->maxsize; in sndbuf_alloc()
128 b->bufsize = b->maxsize; in sndbuf_setup()
165 unsigned int bufsize, allocsize; in sndbuf_resize() local
182 bufsize = blkcnt * blksz; in sndbuf_resize()
184 if (bufsize > b->allocsize || in sndbuf_resize()
185 bufsize < (b->allocsize >> SNDBUF_CACHE_SHIFT)) { in sndbuf_resize()
186 allocsize = round_page(bufsize); in sndbuf_resize()
193 b->allocsize, allocsize, bufsize); in sndbuf_resize()
200 __func__, b, b->allocsize, b->bufsize); in sndbuf_resize()
204 b->bufsize = bufsize; in sndbuf_resize()
[all …]
/freebsd/lib/libc/gen/
H A Dgetmntinfo.c48 static long bufsize; in getmntinfo() local
53 if (bufsize > 0 && (mntsize = getfsstat(mntbuf, bufsize, mode)) < 0) in getmntinfo()
55 while (tries++ < MAX_TRIES && bufsize <= mntsize * sizeof(*mntbuf)) { in getmntinfo()
56 bufsize = (mntsize * SCALING_FACTOR) * sizeof(*mntbuf); in getmntinfo()
57 if ((mntbuf = reallocf(mntbuf, bufsize)) == NULL) in getmntinfo()
59 if ((mntsize = getfsstat(mntbuf, bufsize, mode)) < 0) in getmntinfo()
63 if (mntsize > (bufsize / sizeof(*mntbuf))) in getmntinfo()
64 return (bufsize / sizeof(*mntbuf)); in getmntinfo()
H A Dgetmntinfo-compat11.c45 static long bufsize; in freebsd11_getmntinfo() local
50 if (bufsize > 0 && in freebsd11_getmntinfo()
51 (mntsize = freebsd11_getfsstat(mntbuf, bufsize, flags)) < 0) in freebsd11_getmntinfo()
53 while (bufsize <= mntsize * sizeof(struct freebsd11_statfs)) { in freebsd11_getmntinfo()
56 bufsize = (mntsize + 1) * sizeof(struct freebsd11_statfs); in freebsd11_getmntinfo()
57 if ((mntbuf = (struct freebsd11_statfs *)malloc(bufsize)) == 0) in freebsd11_getmntinfo()
59 if ((mntsize = freebsd11_getfsstat(mntbuf, bufsize, flags)) < 0) in freebsd11_getmntinfo()
/freebsd/tools/test/stress2/testcases/socket/
H A Dsocket.c45 static int bufsize; variable
52 if ((buf = malloc(bufsize)) == NULL) in reader()
53 err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__); in reader()
55 if ((n = read(sv[0], buf, bufsize)) < 0) in reader()
67 if ((buf = malloc(bufsize)) == NULL) in writer()
68 err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__); in writer()
69 for (i = 0; i < bufsize / (int)sizeof(int); i++) in writer()
73 for (i = 0; i < NB; i+= bufsize) { in writer()
74 if (write(sv[1], buf, bufsize) < 0) { in writer()
89 bufsize = 2 << random_int(2, 12); in setup()
/freebsd/lib/libc/tests/secure/
H A Dgenerate-fortify-tests.lua191 bufsize = "FD_SETSIZE",
200 bufsize = "FD_SETSIZE",
209 bufsize = "FD_SETSIZE",
222 bufsize = "sizeof(struct sockaddr)",
236 bufsize = "sizeof(struct sockaddr)",
277 bufsize = "sizeof(struct sockaddr)",
295 bufsize = "sizeof(struct sockaddr)",
339 bufsize = "CMSG_SPACE(sizeof(int))",
359 bufsize = "2",
403 bufsize = 2,
[all …]
/freebsd/lib/libc/tests/string/
H A Dwcsnlen_test.c61 size_t size, len, bufsize; in test_wcsnlen() local
66 for (bufsize = 0; bufsize <= size + 10; bufsize++) { in test_wcsnlen()
67 s1 = makebuf(bufsize * sizeof(wchar_t), i); in test_wcsnlen()
68 wmemcpy(s1, s, bufsize <= size ? bufsize : size); in test_wcsnlen()
69 len = (size > bufsize) ? bufsize : size - 1; in test_wcsnlen()
70 ATF_CHECK(wcsnlen(s1, bufsize) == len); in test_wcsnlen()
H A Dmemccpy_test.c83 size_t bufsize, x; in test_memccpy() local
88 for (bufsize = 0; bufsize <= size + 32; bufsize++) { in test_memccpy()
89 dst = makebuf(bufsize, j); in test_memccpy()
90 if (bufsize < size) { in test_memccpy()
91 src = makebuf(bufsize, i); in test_memccpy()
92 memcpy(src, s, bufsize); in test_memccpy()
100 memset(dst, 'X', bufsize); in test_memccpy()
101 assert(memccpy_fn(dst, src, s[size-1], bufsize) == expected); in test_memccpy()
102 assert(memcmp(src, dst, MIN(bufsize, size)) == 0); in test_memccpy()
103 for (x = size; x < bufsize; x++) in test_memccpy()
[all …]
H A Dstrlcpy_test.c68 size_t size, bufsize, x; in test_strlcpy() local
74 for (bufsize = 0; bufsize <= size + 10; bufsize++) { in test_strlcpy()
77 dst = makebuf(bufsize, j); in test_strlcpy()
78 memset(dst, 'X', bufsize); in test_strlcpy()
79 assert(strlcpy_fn(dst, src, bufsize) == size-1); in test_strlcpy()
80 assert(bufsize == 0 || strncmp(src, dst, bufsize - 1) == 0); in test_strlcpy()
81 for (x = size; x < bufsize; x++) in test_strlcpy()
H A Dstpncpy_test.c67 size_t size, len, bufsize, x; in test_stpncpy() local
73 for (bufsize = 0; bufsize <= size + 10; bufsize++) { in test_stpncpy()
76 dst = makebuf(bufsize, j); in test_stpncpy()
77 memset(dst, 'X', bufsize); in test_stpncpy()
78 len = (bufsize < size) ? bufsize : size - 1; in test_stpncpy()
79 assert(stpncpy_fn(dst, src, bufsize) == dst+len); in test_stpncpy()
81 for (x = len; x < bufsize; x++) in test_stpncpy()
/freebsd/lib/libc/net/
H A Dnss_compat.c100 size_t bufsize; in __nss_compat_getgrnam_r() local
107 bufsize = va_arg(ap, size_t); in __nss_compat_getgrnam_r()
109 nss_status = fn(name, grp, buffer, bufsize, errnop); in __nss_compat_getgrnam_r()
125 size_t bufsize; in __nss_compat_getgrgid_r() local
132 bufsize = va_arg(ap, size_t); in __nss_compat_getgrgid_r()
134 nss_status = fn(gid, grp, buffer, bufsize, errnop); in __nss_compat_getgrgid_r()
149 size_t bufsize; in __nss_compat_getgrent_r() local
157 bufsize = va_arg(ap, size_t); in __nss_compat_getgrent_r()
159 nss_status = fn(grp, buffer, bufsize, errnop); in __nss_compat_getgrent_r()
201 size_t bufsize; in __nss_compat_getpwnam_r() local
[all …]
/freebsd/lib/nss_tacplus/
H A Dnss_tacplus.c96 tacplus_copystr(const char *str, char **buffer, size_t *bufsize) in tacplus_copystr() argument
101 if (len > *bufsize) { in tacplus_copystr()
107 *bufsize -= len; in tacplus_copystr()
113 size_t bufsize) in tacplus_getpwnam_r() argument
153 pwd->pw_name = tacplus_copystr(name, &buffer, &bufsize); in tacplus_getpwnam_r()
158 pwd->pw_passwd = tacplus_copystr("*", &buffer, &bufsize); in tacplus_getpwnam_r()
159 if (2 > bufsize) in tacplus_getpwnam_r()
198 &bufsize); in tacplus_getpwnam_r()
205 &bufsize); in tacplus_getpwnam_r()
212 &bufsize); in tacplus_getpwnam_r()
[all …]
/freebsd/lib/libstdbuf/
H A Dstdbuf.c54 size_t bufsize; in change_buf() local
57 bufsize = 0; in change_buf()
64 bufsize = 0; in change_buf()
72 bufsize = strtol(bufmode, &unit, 0); in change_buf()
78 bufsize *= 1024 * 1024 * 1024; in change_buf()
81 bufsize *= 1024 * 1024; in change_buf()
84 bufsize *= 1024; in change_buf()
95 if (setvbuf(s, NULL, mode, bufsize) != 0) in change_buf()
/freebsd/crypto/openssl/crypto/cmp/
H A Dcmp_status.c171 char *buf, size_t bufsize) in snprint_PKIStatusInfo_parts() argument
188 if (printed_chars < 0 || (size_t)printed_chars >= bufsize) \ in snprint_PKIStatusInfo_parts()
191 bufsize -= printed_chars; in snprint_PKIStatusInfo_parts()
193 printed_chars = BIO_snprintf(write_ptr, bufsize, "%s", status_string); in snprint_PKIStatusInfo_parts()
201 printed_chars = BIO_snprintf(write_ptr, bufsize, "; PKIFailureInfo: "); in snprint_PKIStatusInfo_parts()
207 printed_chars = BIO_snprintf(write_ptr, bufsize, "%s%s", in snprint_PKIStatusInfo_parts()
218 printed_chars = BIO_snprintf(write_ptr, bufsize, "; <no failure info>"); in snprint_PKIStatusInfo_parts()
225 printed_chars = BIO_snprintf(write_ptr, bufsize, "; StatusString%s: ", in snprint_PKIStatusInfo_parts()
230 printed_chars = BIO_snprintf(write_ptr, bufsize, "\"%.*s\"%s", in snprint_PKIStatusInfo_parts()
242 char *buf, size_t bufsize) in OSSL_CMP_snprint_PKIStatusInfo() argument
[all …]
/freebsd/contrib/netbsd-tests/fs/nfs/nfsservice/
H A Dgetmntinfo.c64 static size_t bufsize; local
71 if (bufsize > 0 &&
72 (mntsize = getvfsstat(mntbuf, bufsize, flags)) == -1)
74 while (bufsize <= mntsize * sizeof(struct statvfs)) {
77 bufsize = (mntsize + 1) * sizeof(struct statvfs);
78 if ((mntbuf = malloc(bufsize)) == NULL)
80 if ((mntsize = getvfsstat(mntbuf, bufsize, flags)) == -1)
/freebsd/tools/test/stress2/testcases/tcp/
H A Dtcp.c48 static int bufsize; variable
88 if ((buf = malloc(bufsize)) == NULL) in reader()
89 err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__); in reader()
91 if ((n = read(msgsock, buf, bufsize)) < 0) in reader()
135 if ((buf = malloc(bufsize)) == NULL) in writer()
136 err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__); in writer()
137 for (i = 0; i < bufsize / (int)sizeof(int); i++) in writer()
141 for (i = 0; i < NB; i+= bufsize) { in writer()
142 if (write(tcpsock, buf, bufsize) < 0) { in writer()
159 bufsize = 2 << random_int(1, 12); in setup()
/freebsd/sys/powerpc/pseries/
H A Dphyp_console.c285 uart_phyp_get(struct uart_phyp_softc *sc, void *buffer, size_t bufsize) in uart_phyp_get() argument
339 if (bufsize > sc->inbuflen) in uart_phyp_get()
340 bufsize = sc->inbuflen; in uart_phyp_get()
342 memcpy(buffer, sc->phyp_inbuf.str, bufsize); in uart_phyp_get()
343 sc->inbuflen -= bufsize; in uart_phyp_get()
345 memmove(&sc->phyp_inbuf.str[0], &sc->phyp_inbuf.str[bufsize], in uart_phyp_get()
349 return (bufsize); in uart_phyp_get()
353 uart_phyp_put(struct uart_phyp_softc *sc, void *buffer, size_t bufsize) in uart_phyp_put() argument
367 if (bufsize > 16) in uart_phyp_put()
368 bufsize = 16; in uart_phyp_put()
[all …]
/freebsd/tools/test/stress2/testcases/mkfifo/
H A Dmkfifo.c43 static int bufsize, freespace; variable
54 if ((buf = malloc(bufsize)) == NULL) in reader()
55 err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__); in reader()
62 if ((n = read(fd, buf, bufsize)) < 0) in reader()
78 if ((buf = malloc(bufsize)) == NULL) in writer()
79 err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__); in writer()
80 memset(buf, 0, bufsize); in writer()
82 if (write(fd, buf, bufsize) < 0) in writer()
117 bufsize = 2 << random_int(2, 12); in setup()
/freebsd/usr.sbin/mptutil/
H A Dmpt_cam.c64 size_t bufsize; in fetch_path_id() local
75 bufsize = sizeof(struct dev_match_result) * 1; in fetch_path_id()
77 ccb.cdm.match_buf_len = bufsize; in fetch_path_id()
78 ccb.cdm.matches = calloc(1, bufsize); in fetch_path_id()
80 bufsize = sizeof(struct dev_match_pattern) * 1; in fetch_path_id()
82 ccb.cdm.pattern_buf_len = bufsize; in fetch_path_id()
83 ccb.cdm.patterns = calloc(1, bufsize); in fetch_path_id()
127 size_t bufsize; in mpt_query_disk() local
149 bufsize = sizeof(struct dev_match_result) * 5; in mpt_query_disk()
151 ccb.cdm.match_buf_len = bufsize; in mpt_query_disk()
[all …]
/freebsd/tools/test/stress2/testcases/udp/
H A Dudp.c42 static int bufsize; variable
47 bufsize = 2 << random_int(1, 12); in setup()
94 if ((buf = calloc(1, bufsize)) == NULL) in test()
95 err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__); in test()
98 printf("udp %s:9 with %d bytes\n", hostname, bufsize); in test()
100 n = write(f, buf, bufsize); in test()
106 err(1, "write(%d) #%d", bufsize, i); in test()
/freebsd/tools/test/stress2/misc/
H A Dtcp4.sh58 static int bufsize;
102 if ((buf = malloc(bufsize)) == NULL)
103 err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__);
105 if ((n = read(msgsock, buf, bufsize)) < 0)
150 if ((buf = malloc(bufsize)) == NULL)
151 err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__);
152 for (i = 0; i < bufsize / (int)sizeof(int); i++)
157 for (i = 0; i < NB; i+= bufsize) {
158 if (write(tcpsock, buf, bufsize) < 0) {
175 bufsize = 2 << random_int(1, 12);
/freebsd/contrib/gdtoa/
H A Dg_ffmt.c36 g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; size_t bufsize; in g_ffmt() argument
38 g_ffmt(char *buf, float *f, int ndig, size_t bufsize)
53 if (bufsize < ndig + 10)
86 if (bufsize < 16)
92 return g__fmt(buf, s, se, decpt, sign, bufsize);

12345678910>>...20