| /freebsd/tests/sys/fs/fusefs/ |
| H A D | read.cc | 185 ssize_t bufsize = strlen(CONTENTS); in TEST_F() local 186 uint8_t buf[bufsize]; in TEST_F() 189 expect_lookup(RELPATH, ino, bufsize); in TEST_F() 191 expect_read(ino, 0, bufsize, bufsize, CONTENTS); in TEST_F() 196 iocb.aio_nbytes = bufsize; in TEST_F() 202 ASSERT_EQ(bufsize, aio_waitcomplete(&piocb, NULL)) << strerror(errno); in TEST_F() 203 ASSERT_EQ(0, memcmp(buf, CONTENTS, bufsize)); in TEST_F() 218 ssize_t bufsize = 50; in TEST_F() local 219 char buf0[bufsize], buf1[bufsize]; in TEST_F() 260 iocb0.aio_nbytes = bufsize; in TEST_F() [all …]
|
| H A D | write.cc | 245 ssize_t bufsize = strlen(CONTENTS); in TEST_F() local 250 expect_write(ino, offset, bufsize, bufsize, CONTENTS); in TEST_F() 255 iocb.aio_nbytes = bufsize; in TEST_F() 261 ASSERT_EQ(bufsize, aio_waitcomplete(&piocb, NULL)) << strerror(errno); in TEST_F() 369 ssize_t bufsize = strlen(CONTENTS0) + 1; in TEST_F() local 370 char readbuf[bufsize]; in TEST_F() 372 expect_lookup(RELPATH, ino, bufsize); in TEST_F() 374 expect_read(ino, 0, bufsize, bufsize, CONTENTS0); in TEST_F() 375 expect_write(ino, 0, bufsize, bufsize, CONTENTS1); in TEST_F() 381 ASSERT_EQ(bufsize, read(fd, readbuf, bufsize)) << strerror(errno); in TEST_F() [all …]
|
| H A D | fsync.cc | 99 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/sys/dev/sound/pcm/ |
| H A D | buffer.c | 96 b->bufsize = b->maxsize; in sndbuf_alloc() 125 b->bufsize = b->maxsize; in sndbuf_setup() 159 unsigned int bufsize, allocsize; in sndbuf_resize() local 176 bufsize = blkcnt * blksz; in sndbuf_resize() 178 if (bufsize > b->allocsize || in sndbuf_resize() 179 bufsize < (b->allocsize >> SNDBUF_CACHE_SHIFT)) { in sndbuf_resize() 180 allocsize = round_page(bufsize); in sndbuf_resize() 187 b->allocsize, allocsize, bufsize); in sndbuf_resize() 193 __func__, b, b->allocsize, b->bufsize); in sndbuf_resize() 197 b->bufsize = bufsize; in sndbuf_resize() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/Headers/ |
| H A D | hexagon_circ_brev_intrinsics.h | 22 #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/lib/libc/gen/ |
| H A D | getmntinfo.c | 48 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 D | getmntinfo-compat11.c | 45 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 D | socket.c | 45 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 D | generate-fortify-tests.lua | 196 bufsize = "FD_SETSIZE", 205 bufsize = "FD_SETSIZE", 214 bufsize = "FD_SETSIZE", 227 bufsize = "sizeof(struct sockaddr)", 241 bufsize = "sizeof(struct sockaddr)", 282 bufsize = "sizeof(struct sockaddr)", 300 bufsize = "sizeof(struct sockaddr)", 344 bufsize = "CMSG_SPACE(sizeof(int))", 364 bufsize = "2", 408 bufsize = 2, [all …]
|
| /freebsd/lib/libc/tests/string/ |
| H A D | wcsnlen_test.c | 61 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 D | stpncpy_test.c | 81 size_t bufsize, x; in test_stpncpy() local 86 for (bufsize = 0; bufsize <= size + 32; bufsize++) { in test_stpncpy() 87 dst = makebuf(bufsize, j); in test_stpncpy() 88 if (bufsize < size) { in test_stpncpy() 89 src = makebuf(bufsize, i); in test_stpncpy() 90 memcpy(src, s, bufsize); in test_stpncpy() 91 expected = dst + bufsize; in test_stpncpy() 98 memset(dst, 'X', bufsize); in test_stpncpy() 99 assert(stpncpy_fn(dst, src, bufsize) == expected); in test_stpncpy() 100 assert(memcmp(src, dst, MIN(bufsize, size)) == 0); in test_stpncpy() [all …]
|
| H A D | memccpy_test.c | 83 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 D | strlcpy_test.c | 68 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()
|
| /freebsd/lib/libc/net/ |
| H A D | nss_compat.c | 100 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 D | nss_tacplus.c | 96 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 D | stdbuf.c | 54 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 D | cmp_status.c | 170 char *buf, size_t bufsize) in snprint_PKIStatusInfo_parts() argument 187 if (printed_chars < 0 || (size_t)printed_chars >= bufsize) \ in snprint_PKIStatusInfo_parts() 190 bufsize -= printed_chars; in snprint_PKIStatusInfo_parts() 192 printed_chars = BIO_snprintf(write_ptr, bufsize, "%s", status_string); in snprint_PKIStatusInfo_parts() 200 printed_chars = BIO_snprintf(write_ptr, bufsize, "; PKIFailureInfo: "); in snprint_PKIStatusInfo_parts() 206 printed_chars = BIO_snprintf(write_ptr, bufsize, "%s%s", in snprint_PKIStatusInfo_parts() 217 printed_chars = BIO_snprintf(write_ptr, bufsize, "; <no failure info>"); in snprint_PKIStatusInfo_parts() 224 printed_chars = BIO_snprintf(write_ptr, bufsize, "; StatusString%s: ", in snprint_PKIStatusInfo_parts() 229 printed_chars = BIO_snprintf(write_ptr, bufsize, "\"%.*s\"%s", in snprint_PKIStatusInfo_parts() 241 char *buf, size_t bufsize) in OSSL_CMP_snprint_PKIStatusInfo() argument [all …]
|
| /freebsd/contrib/netbsd-tests/fs/nfs/nfsservice/ |
| H A D | getmntinfo.c | 64 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/crypto/krb5/src/lib/gssapi/krb5/ |
| H A D | export_sec_context.c | 37 size_t bufsize, blen; in krb5_gss_export_sec_context() local 55 bufsize = 0; in krb5_gss_export_sec_context() 56 if ((kret = kg_ctx_size(context, ctx, &bufsize))) in krb5_gss_export_sec_context() 60 if ((obuffer = gssalloc_malloc(bufsize)) == NULL) { in krb5_gss_export_sec_context() 66 blen = bufsize; in krb5_gss_export_sec_context() 72 interprocess_token->length = bufsize - blen; in krb5_gss_export_sec_context() 87 if (obuffer && bufsize) { in krb5_gss_export_sec_context() 88 zap(obuffer, bufsize); in krb5_gss_export_sec_context()
|
| H A D | k5sealv3.c | 67 size_t bufsize = 16; in gss_krb5int_make_seal_token_v3() local 142 bufsize = 16 + encrypt_size; in gss_krb5int_make_seal_token_v3() 144 outbuf = gssalloc_malloc(bufsize); in gss_krb5int_make_seal_token_v3() 169 cipher.ciphertext.length = bufsize - 16; in gss_krb5int_make_seal_token_v3() 180 if (gss_krb5int_rotate_left(outbuf+16, bufsize-16, in gss_krb5int_make_seal_token_v3() 181 (bufsize-16) - (rrc % (bufsize - 16)))) in gss_krb5int_make_seal_token_v3() 205 bufsize = 16 + message2->length + cksumsize; in gss_krb5int_make_seal_token_v3() 206 outbuf = gssalloc_malloc(bufsize); in gss_krb5int_make_seal_token_v3() 244 zap(outbuf,bufsize); in gss_krb5int_make_seal_token_v3() 257 if (gss_krb5int_rotate_left(outbuf+16, bufsize-16, in gss_krb5int_make_seal_token_v3() [all …]
|
| /freebsd/crypto/krb5/src/kdc/ |
| H A D | kdc_transit.c | 152 size_t bufsize; in add_to_transited() local 181 bufsize = strlen(realm) + strlen(otrans) + 3; in add_to_transited() 182 if (bufsize > MAX_REALM_LN) in add_to_transited() 183 bufsize = MAX_REALM_LN; in add_to_transited() 184 if (!(trans = (char *) malloc(bufsize))) { in add_to_transited() 372 if (strlcat(trans, ",", bufsize) >= bufsize) { in add_to_transited() 377 if (strlcat(trans, current, bufsize) >= bufsize) { in add_to_transited() 391 if (strlcat(trans, ",", bufsize) >= bufsize) { in add_to_transited() 397 if (strlcat(trans, " ", bufsize) >= bufsize) { in add_to_transited() 402 if (strlcat(trans, realm, bufsize) >= bufsize) { in add_to_transited()
|
| /freebsd/tools/test/stress2/testcases/tcp/ |
| H A D | tcp.c | 48 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 D | phyp_console.c | 285 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 D | mkfifo.c | 43 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/tools/test/stress2/testcases/udp/ |
| H A D | udp.c | 42 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()
|