Home
last modified time | relevance | path

Searched refs:bufsz (Results 1 – 25 of 171) sorted by relevance

1234567

/freebsd/contrib/ofed/libibmad/
H A Ddump.c47 void mad_dump_int(char *buf, int bufsz, void *val, int valsz) in mad_dump_int() argument
51 snprintf(buf, bufsz, "%d", *(uint32_t *) val & 0xff); in mad_dump_int()
54 snprintf(buf, bufsz, "%d", *(uint32_t *) val & 0xffff); in mad_dump_int()
58 snprintf(buf, bufsz, "%d", *(uint32_t *) val); in mad_dump_int()
64 snprintf(buf, bufsz, "%" PRIu64, *(uint64_t *) val); in mad_dump_int()
72 void mad_dump_uint(char *buf, int bufsz, void *val, int valsz) in mad_dump_uint() argument
76 snprintf(buf, bufsz, "%u", *(uint32_t *) val & 0xff); in mad_dump_uint()
79 snprintf(buf, bufsz, "%u", *(uint32_t *) val & 0xffff); in mad_dump_uint()
83 snprintf(buf, bufsz, "%u", *(uint32_t *) val); in mad_dump_uint()
89 snprintf(buf, bufsz, "%" PRIu64, *(uint64_t *) val); in mad_dump_uint()
[all …]
/freebsd/lib/libc/gen/
H A Duexterr_format.c135 uexterr_format_msg(const struct uexterror *ue, char *buf, size_t bufsz) in uexterr_format_msg() argument
142 #define PCHAR(c) if (bufsz > 1) { *buf++ = c; bufsz--; } /* reserve last byte */ in uexterr_format_msg()
144 psz = snprintf(buf, bufsz, f, a); \ in uexterr_format_msg()
145 if (psz > bufsz) \ in uexterr_format_msg()
148 bufsz -= psz; \ in uexterr_format_msg()
299 __uexterr_format(const struct uexterror *ue, char *buf, size_t bufsz) in __uexterr_format() argument
303 if (bufsz > UEXTERROR_MAXLEN) in __uexterr_format()
304 bufsz = UEXTERROR_MAXLEN; in __uexterr_format()
306 strlcpy(buf, "", bufsz); in __uexterr_format()
313 uexterr_format_msg(ue, buf, bufsz); in __uexterr_format()
[all …]
H A Duexterr_gettext.c15 __libc_uexterr_gettext(char *buf, size_t bufsz) in __libc_uexterr_gettext() argument
17 return (__uexterr_format(&uexterr, buf, bufsz)); in __libc_uexterr_gettext()
21 uexterr_gettext(char *buf, size_t bufsz) in uexterr_gettext() argument
24 __libc_interposing[INTERPOS_uexterr_gettext])(buf, bufsz)); in uexterr_gettext()
/freebsd/contrib/libder/tests/
H A Dtest_pubkey.c51 test_construction(struct libder_ctx*ctx, const uint8_t *buf, size_t bufsz) in test_construction() argument
82 assert(outsz == bufsz); in test_construction()
83 assert(memcmp(out, buf, bufsz) == 0); in test_construction()
96 size_t bufsz, outsz, rootsz; in main() local
111 bufsz = sb.st_size; in main()
112 buf = malloc(bufsz); in main()
115 readsz = read(fd, buf, bufsz); in main()
118 assert(readsz == bufsz); in main()
121 rootsz = bufsz; in main()
126 assert(rootsz == bufsz); in main()
[all …]
H A Dtest_privkey.c67 test_construction(struct libder_ctx *ctx, const uint8_t *buf, size_t bufsz) in test_construction() argument
113 assert(outsz == bufsz); in test_construction()
115 assert(memcmp(out, buf, bufsz) == 0); in test_construction()
128 size_t bufsz, outsz, rootsz; in main() local
143 bufsz = sb.st_size; in main()
144 buf = malloc(bufsz); in main()
147 readsz = read(fd, buf, bufsz); in main()
150 assert(readsz == bufsz); in main()
153 rootsz = bufsz; in main()
158 assert(rootsz == bufsz); in main()
[all …]
/freebsd/crypto/openssl/apps/lib/
H A Dapp_params.c13 static int describe_param_type(char *buf, size_t bufsz, const OSSL_PARAM *param) in describe_param_type() argument
45 printed_len = BIO_snprintf(buf, bufsz, "%s: ", param->key); in describe_param_type()
48 bufsz -= printed_len; in describe_param_type()
50 printed_len = BIO_snprintf(buf, bufsz, "%s%s", type_mod, type); in describe_param_type()
53 bufsz -= printed_len; in describe_param_type()
56 printed_len = BIO_snprintf(buf, bufsz, " [%d]", param->data_type); in describe_param_type()
59 bufsz -= printed_len; in describe_param_type()
63 printed_len = BIO_snprintf(buf, bufsz, " (arbitrary size)"); in describe_param_type()
65 printed_len = BIO_snprintf(buf, bufsz, " (max %zu bytes large)", in describe_param_type()
69 bufsz -= printed_len; in describe_param_type()
/freebsd/crypto/openssl/crypto/sha/
H A Dsha3.c24 ctx->bufsz = 0; in ossl_sha3_reset()
65 if ((num = ctx->bufsz) != 0) { /* process intermediate buffer? */ in ossl_sha3_update()
70 ctx->bufsz += len; in ossl_sha3_update()
81 ctx->bufsz = 0; in ossl_sha3_update()
92 ctx->bufsz = rem; in ossl_sha3_update()
106 size_t num = ctx->bufsz; in ossl_sha3_final()
143 size_t num = ctx->bufsz; in ossl_sha3_squeeze()
169 num = ctx->bufsz = 0; in ossl_sha3_squeeze()
178 if (outlen > ctx->bufsz) in ossl_sha3_squeeze()
179 len = ctx->bufsz; in ossl_sha3_squeeze()
[all …]
/freebsd/contrib/libder/libder/
H A Dlibder_write.c16 size_t bufsz; member
158 left = mwrite->bufsz - mwrite->offset; in memory_write()
176 size_t *bufsz) in libder_write() argument
186 if ((buf == NULL && *bufsz != 0) || (buf != NULL && *bufsz == 0)) in libder_write()
202 if (*bufsz == 0) { in libder_write()
203 *bufsz = needed; in libder_write()
207 } else if (needed > *bufsz) { in libder_write()
208 *bufsz = needed; in libder_write()
214 mwrite.bufsz = *bufsz; in libder_write()
226 *bufsz = mwrite.offset; in libder_write()
/freebsd/contrib/mandoc/
H A Dcompat_getline.c25 getline(char **buf, size_t *bufsz, FILE *fp) in getline() argument
31 if (buf == NULL || bufsz == NULL) { in getline()
37 *bufsz = 0; in getline()
43 if (pos + 1 >= *bufsz) { in getline()
44 nbufsz = *bufsz ? *bufsz * 2 : BUFSIZ; in getline()
48 *bufsz = nbufsz; in getline()
/freebsd/tests/sys/kern/tty/
H A Dreadsz.c32 size_t bufsz = 0, reps; in main() local
64 bufsz = strtonum(optarg, 1, SSIZE_MAX, &errstr); in main()
73 if (bufsz == 0) { in main()
75 bufsz = reps; in main()
77 bufsz = LINE_MAX; in main()
80 buf = malloc(bufsz); in main()
92 readsz = MIN(bufsz, reps); in main()
94 readsz = bufsz; in main()
/freebsd/contrib/elftoolchain/libelf/
H A Dlibelf_open.c53 size_t bufsz, datasz; in _libelf_read_special_file() local
58 bufsz = _LIBELF_INITSIZE; in _libelf_read_special_file()
59 if ((buf = malloc(bufsz)) == NULL) in _libelf_read_special_file()
68 if (datasz == bufsz) { in _libelf_read_special_file()
69 bufsz *= 2; in _libelf_read_special_file()
70 if ((t = realloc(buf, bufsz)) == NULL) in _libelf_read_special_file()
76 assert(bufsz - datasz > 0); in _libelf_read_special_file()
78 if ((readsz = read(fd, t, bufsz - datasz)) <= 0) in _libelf_read_special_file()
81 } while (datasz < bufsz); in _libelf_read_special_file()
95 if (bufsz > datasz) { in _libelf_read_special_file()
/freebsd/sys/contrib/dev/iwlwifi/mvm/
H A Ddebugfs-vif.c144 int bufsz = sizeof(buf); in iwl_dbgfs_tx_pwr_lmt_read() local
147 pos = scnprintf(buf, bufsz, "bss limit = %d\n", in iwl_dbgfs_tx_pwr_lmt_read()
161 int bufsz = sizeof(buf); in iwl_dbgfs_pm_params_read() local
164 pos = iwl_mvm_power_mac_dbgfs_read(mvm, vif, buf, bufsz); in iwl_dbgfs_pm_params_read()
179 int bufsz = sizeof(buf); in iwl_dbgfs_mac_params_read() local
189 pos += scnprintf(buf+pos, bufsz-pos, "type: ibss\n"); in iwl_dbgfs_mac_params_read()
192 pos += scnprintf(buf+pos, bufsz-pos, "type: bss\n"); in iwl_dbgfs_mac_params_read()
195 pos += scnprintf(buf+pos, bufsz-pos, "type: ap\n"); in iwl_dbgfs_mac_params_read()
198 pos += scnprintf(buf+pos, bufsz-pos, "type: p2p client\n"); in iwl_dbgfs_mac_params_read()
201 pos += scnprintf(buf+pos, bufsz-pos, "type: p2p go\n"); in iwl_dbgfs_mac_params_read()
[all …]
H A Ddebugfs.c321 int bufsz = sizeof(buf); in iwl_dbgfs_sar_geo_profile_read() local
335 pos = scnprintf(buf, bufsz, in iwl_dbgfs_sar_geo_profile_read()
338 pos += scnprintf(buf + pos, bufsz - pos, in iwl_dbgfs_sar_geo_profile_read()
340 pos += scnprintf(buf + pos, bufsz - pos, in iwl_dbgfs_sar_geo_profile_read()
345 pos += scnprintf(buf + pos, bufsz - pos, in iwl_dbgfs_sar_geo_profile_read()
381 int i, pos = 0, bufsz = sizeof(buf); in iwl_dbgfs_stations_read() local
386 pos += scnprintf(buf + pos, bufsz - pos, "%.2d: ", i); in iwl_dbgfs_stations_read()
390 pos += scnprintf(buf + pos, bufsz - pos, "N/A\n"); in iwl_dbgfs_stations_read()
392 pos += scnprintf(buf + pos, bufsz - pos, "%ld\n", in iwl_dbgfs_stations_read()
395 pos += scnprintf(buf + pos, bufsz - pos, "%pM\n", in iwl_dbgfs_stations_read()
[all …]
/freebsd/tests/sys/geom/class/eli/
H A Dunaligned_io.c53 size_t bufsz, iosz; in main() local
76 bufsz = iosz + secsz; in main()
77 buf1 = mmap(NULL, bufsz, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, in main()
81 buf2 = mmap(NULL, bufsz, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, in main()
86 arc4random_buf(buf1, bufsz); in main()
87 n = pwrite(fd, buf1, bufsz, 0); in main()
88 if (n < 0 || (size_t)n != bufsz) in main()
118 arc4random_buf(buf1, bufsz); in main()
/freebsd/crypto/openssl/providers/implementations/digests/
H A Dsha3_prov.c83 if ((num = ctx->bufsz) != 0) { in keccak_update()
89 ctx->bufsz += len; in keccak_update()
98 ctx->bufsz = 0; in keccak_update()
105 ctx->bufsz = rem; in keccak_update()
219 s390x_klmd(ctx->buf, ctx->bufsz, NULL, 0, fc, ctx->A); in s390x_sha3_final()
236 s390x_klmd(ctx->buf, ctx->bufsz, out, outlen, fc, ctx->A); in s390x_shake_final()
257 s390x_klmd(ctx->buf, ctx->bufsz, out, outlen, fc, ctx->A); in s390x_shake_squeeze()
258 ctx->bufsz = outlen % ctx->block_size; in s390x_shake_squeeze()
263 if (ctx->bufsz != 0) { in s390x_shake_squeeze()
264 len = ctx->block_size - ctx->bufsz; in s390x_shake_squeeze()
[all …]
/freebsd/sys/contrib/dev/iwlwifi/mld/
H A Ddebugfs.h99 #define WIPHY_DEBUGFS_WRITE_WRAPPER(name, bufsz, objtype) \ argument
107 char buf[bufsz] = {}; \
116 #define WIPHY_DEBUGFS_WRITE_FILE_OPS(name, bufsz, objtype) \ argument
117 WIPHY_DEBUGFS_WRITE_WRAPPER(name, bufsz, objtype) \
184 #define WIPHY_DEBUGFS_READ_FILE_OPS_MLD(name, bufsz) \ argument
185 MLD_DEBUGFS_OPEN_WRAPPER(name, bufsz, struct iwl_mld) \
194 #define WIPHY_DEBUGFS_WRITE_FILE_OPS_MLD(name, bufsz) \ argument
195 MLD_DEBUGFS_OPEN_WRAPPER(name, bufsz, struct iwl_mld) \
204 #define WIPHY_DEBUGFS_READ_WRITE_FILE_OPS_MLD(name, bufsz) \ argument
205 MLD_DEBUGFS_OPEN_WRAPPER(name, bufsz, struct iwl_mld) \
[all …]
/freebsd/tools/bus_space/
H A Dbus.c130 bs_read(int rid, off_t ofs, void *buf, ssize_t bufsz) in bs_read() argument
140 if (ofs < 0 || ofs > r->size - bufsz) { in bs_read()
147 switch (bufsz) { in bs_read()
165 s = read(r->fd, buf, bufsz); in bs_read()
166 if (s != bufsz) in bs_read()
228 bs_write(int rid, off_t ofs, void *buf, ssize_t bufsz) in bs_write() argument
238 if (ofs < 0 || ofs > r->size - bufsz) { in bs_write()
245 switch (bufsz) { in bs_write()
263 s = write(r->fd, buf, bufsz); in bs_write()
264 if (s != bufsz) in bs_write()
/freebsd/bin/pkill/tests/
H A Dspin_helper.c60 size_t bufsz = ARG_MAX - in exec_largeargs() local
74 s = malloc(bufsz + 1); in exec_largeargs()
76 s = realloc(s, bufsz + 1); in exec_largeargs()
79 memset(s, 'x', bufsz); in exec_largeargs()
80 s[bufsz] = '\0'; in exec_largeargs()
84 bufsz--; in exec_largeargs()
/freebsd/tools/test/stress2/misc/
H A Dmmap42.sh33 size_t bufsz;
42 bufsz = sb.st_size;
43 buf = obuf = mmap(NULL, bufsz, PROT_READ, MAP_SHARED, mfd, 0);
53 while (bufsz > 0) {
54 wsz = write(fd, buf, bufsz);
59 bufsz -= wsz;
63 bufsz = sb.st_size;
H A Dzfs18.sh35 size_t bufsz;
44 bufsz = sb.st_size;
45 buf = obuf = mmap(NULL, bufsz, PROT_READ, MAP_SHARED, mfd, 0);
55 while (bufsz > 0) {
56 wsz = write(fd, buf, bufsz);
61 bufsz -= wsz;
65 bufsz = sb.st_size;
/freebsd/sys/contrib/dev/mediatek/mt76/mt7996/
H A Ddebugfs.c136 static const size_t bufsz = 1024; in mt7996_sys_recovery_get() local
138 buff = kmalloc(bufsz, GFP_KERNEL); in mt7996_sys_recovery_get()
143 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get()
145 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get()
147 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get()
149 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get()
151 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get()
153 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get()
155 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get()
157 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get()
[all …]
/freebsd/sys/dev/sound/macio/
H A Daoa.c65 unsigned int bufsz; /* buffer size */ member
77 KASSERT(dma->bufsz == dma->buf->bufsize, ("bad size")); in aoa_dma_set_program()
79 dma->slots = dma->bufsz / dma->blksz; in aoa_dma_set_program()
129 dma->bufsz = AOA_BUFFER_SIZE; in aoa_dma_create()
164 if (blocksz > dma->bufsz) in aoa_chan_setblocksize()
165 blocksz = dma->bufsz; in aoa_chan_setblocksize()
167 err = sndbuf_resize(dma->buf, dma->bufsz / blocksz, blocksz); in aoa_chan_setblocksize()
177 err = dbdma_resize_channel(dma->channel, 2 + dma->bufsz / blocksz); in aoa_chan_setblocksize()
238 max_slots = 2 + dma->bufsz / dma->blksz; in aoa_chan_init()
246 if (sndbuf_alloc(dma->buf, dma->tag, 0, dma->bufsz) != 0) { in aoa_chan_init()
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/
H A Dmkfile.c64 size_t bufsz = 0; in main() local
207 if (bufsz != st.st_blksize) { in main()
210 bufsz = (size_t)st.st_blksize; in main()
211 buf = calloc(1, bufsz); in main()
215 " size %d\n"), (int)bufsz); in main()
217 bufsz = 0; in main()
226 size_t bytes = (size_t)MIN(bufsz, size-written); in main()
/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dciphercommon.c195 ctx->bufsz = 0; in cipher_generic_init_internal()
359 if (ctx->bufsz != 0) in ossl_cipher_generic_block_update()
360 nextblocks = ossl_cipher_fillblock(ctx->buf, &ctx->bufsz, blksz, in ossl_cipher_generic_block_update()
370 if (ctx->bufsz == blksz && (ctx->enc || inl > 0 || !ctx->pad)) { in ossl_cipher_generic_block_update()
379 ctx->bufsz = 0; in ossl_cipher_generic_block_update()
406 && !ossl_cipher_trailingdata(ctx->buf, &ctx->bufsz, blksz, &in, &inl)) { in ossl_cipher_generic_block_update()
437 ossl_cipher_padblock(ctx->buf, &ctx->bufsz, blksz); in ossl_cipher_generic_block_final()
438 } else if (ctx->bufsz == 0) { in ossl_cipher_generic_block_final()
441 } else if (ctx->bufsz != blksz) { in ossl_cipher_generic_block_final()
454 ctx->bufsz = 0; in ossl_cipher_generic_block_final()
[all …]
/freebsd/tools/tools/so_splice/
H A Dproxy.c48 size_t bufsz; member
77 buf = malloc(sc->bufsz); in proxy_copy()
95 n = read(rs, buf, sc->bufsz); in proxy_copy()
388 size_t bufsz, enum proxy_mode mode, bool loopback) in proxy_init() argument
393 sc->bufsz = bufsz; in proxy_init()
403 size_t bufsz; in main() local
412 bufsz = 2 * 1024 * 1024ul; in main()
431 bufsz = atoi(optarg); in main()
445 proxy_init(&sc, laddr, taddr, bufsz, mode, loopback); in main()

1234567