| /freebsd-13.1/sys/dev/bhnd/nvram/ |
| H A D | bhnd_nvram_iores.c | 197 *nbytes = 0; in bhnd_nvram_iores_validate_req() 206 *nbytes = ummin(*nbytes, iores->size - offset); in bhnd_nvram_iores_validate_req() 215 size_t nbytes) in bhnd_nvram_iores_read() argument 226 navail = nbytes; in bhnd_nvram_iores_read() 235 if (nbytes == 0) in bhnd_nvram_iores_read() 243 nbytes); in bhnd_nvram_iores_read() 247 nbytes / 2); in bhnd_nvram_iores_read() 251 nbytes / 4); in bhnd_nvram_iores_read() 273 navail = nbytes; in bhnd_nvram_iores_write() 286 nbytes); in bhnd_nvram_iores_write() [all …]
|
| H A D | bhnd_nvram_value_prf.c | 217 size_t limit, nbytes; in bhnd_nvram_val_vprintf() local 223 nbytes = 0; in bhnd_nvram_val_vprintf() 230 if (limit > nbytes) \ in bhnd_nvram_val_vprintf() 235 nbytes++; \ in bhnd_nvram_val_vprintf() 547 if (limit > nbytes) in bhnd_nvram_val_vprintf() 753 if (limit > nbytes && limit - nbytes >= slen) in bhnd_nvram_val_vprintf() 760 nbytes += arg_size; in bhnd_nvram_val_vprintf() 866 if (limit > nbytes) in bhnd_nvram_val_vprintf() 870 nbytes++; in bhnd_nvram_val_vprintf() 875 *olen = nbytes; in bhnd_nvram_val_vprintf() [all …]
|
| H A D | bhnd_nvram_ioptr.c | 141 size_t nbytes, size_t *navail) in bhnd_nvram_ioptr_ptr() argument 150 if (avail < nbytes) in bhnd_nvram_ioptr_ptr() 164 const void **ptr, size_t nbytes, size_t *navail) in bhnd_nvram_ioptr_read_ptr() argument 173 error = bhnd_nvram_ioptr_ptr(ioptr, offset, &writep, nbytes, navail); in bhnd_nvram_ioptr_read_ptr() 184 void **ptr, size_t nbytes, size_t *navail) in bhnd_nvram_ioptr_write_ptr() argument 195 return (bhnd_nvram_ioptr_ptr(ioptr, offset, ptr, nbytes, navail)); in bhnd_nvram_ioptr_write_ptr() 200 size_t nbytes) in bhnd_nvram_ioptr_read() argument 206 if ((error = bhnd_nvram_io_read_ptr(io, offset, &ptr, nbytes, NULL))) in bhnd_nvram_ioptr_read() 210 memcpy(buffer, ptr, nbytes); in bhnd_nvram_ioptr_read() 216 void *buffer, size_t nbytes) in bhnd_nvram_ioptr_write() argument [all …]
|
| H A D | bhnd_nvram_io.c | 64 size_t nbytes) in bhnd_nvram_io_read() argument 66 return (io->iops->read(io, offset, buffer, nbytes)); in bhnd_nvram_io_read() 96 const void **ptr, size_t nbytes, size_t *navail) in bhnd_nvram_io_read_ptr() argument 98 return (io->iops->read_ptr(io, offset, ptr, nbytes, navail)); in bhnd_nvram_io_read_ptr() 120 size_t nbytes) in bhnd_nvram_io_write() argument 122 return (io->iops->write(io, offset, buffer, nbytes)); in bhnd_nvram_io_write() 154 size_t nbytes, size_t *navail) in bhnd_nvram_io_write_ptr() argument 156 return (io->iops->write_ptr(io, offset, ptr, nbytes, navail)); in bhnd_nvram_io_write_ptr()
|
| H A D | bhnd_nvram_value.c | 680 nbytes = 0; in bhnd_nvram_val_encode_null() 686 nbytes = 0; in bhnd_nvram_val_encode_null() 694 *olen = nbytes; in bhnd_nvram_val_encode_null() 742 nbytes = 0; in bhnd_nvram_val_encode_bool() 772 *olen = nbytes; in bhnd_nvram_val_encode_bool() 836 nbytes = 0; in bhnd_nvram_val_encode_string() 871 nbytes++; in bhnd_nvram_val_encode_string() 959 nbytes++; in bhnd_nvram_val_encode_string() 1300 *olen = nbytes; in bhnd_nvram_val_encode_int() 1524 nbytes = 0; in bhnd_nvram_val_generic_encode() [all …]
|
| H A D | bhnd_nvram_subr.c | 733 if (nbytes == NULL) in bhnd_nvram_parse_int() 738 *nbytes = 0; in bhnd_nvram_parse_int() 747 for (; *nbytes < maxlen; (*nbytes)++) { in bhnd_nvram_parse_int() 753 if (*nbytes == maxlen) in bhnd_nvram_parse_int() 760 (*nbytes)++; in bhnd_nvram_parse_int() 763 (*nbytes)++; in bhnd_nvram_parse_int() 773 if (maxlen - *nbytes >= 2 && str[*nbytes] == '0' && in bhnd_nvram_parse_int() 774 (str[*nbytes+1] == 'x' || str[*nbytes+1] == 'X')) in bhnd_nvram_parse_int() 777 (*nbytes) += 2; in bhnd_nvram_parse_int() 865 for (; *nbytes < maxlen; (*nbytes)++) { in bhnd_nvram_parse_int() [all …]
|
| H A D | bhnd_nvram_iobuf.c | 256 size_t nbytes, size_t *navail) in bhnd_nvram_iobuf_ptr() argument 265 if (avail < nbytes) in bhnd_nvram_iobuf_ptr() 279 const void **ptr, size_t nbytes, size_t *navail) in bhnd_nvram_iobuf_read_ptr() argument 288 error = bhnd_nvram_iobuf_ptr(iobuf, offset, &ioptr, nbytes, navail); in bhnd_nvram_iobuf_read_ptr() 299 void **ptr, size_t nbytes, size_t *navail) in bhnd_nvram_iobuf_write_ptr() argument 306 return (bhnd_nvram_iobuf_ptr(iobuf, offset, ptr, nbytes, navail)); in bhnd_nvram_iobuf_write_ptr() 311 size_t nbytes) in bhnd_nvram_iobuf_read() argument 317 if ((error = bhnd_nvram_io_read_ptr(io, offset, &ptr, nbytes, NULL))) in bhnd_nvram_iobuf_read() 321 memcpy(buffer, ptr, nbytes); in bhnd_nvram_iobuf_read() 327 void *buffer, size_t nbytes) in bhnd_nvram_iobuf_write() argument [all …]
|
| /freebsd-13.1/contrib/apr/file_io/unix/ |
| H A D | readwrite.c | 79 if (*nbytes) { in file_read_buffered() 90 if (*nbytes <= 0) { in apr_file_read() 91 *nbytes = 0; in apr_file_read() 107 (*nbytes)--; in apr_file_read() 140 *nbytes += rv; in apr_file_read() 218 (*nbytes) = 0; in apr_file_write() 221 *nbytes = rv; in apr_file_write() 256 *nbytes = 0; in apr_file_writev() 260 *nbytes = bytes; in apr_file_writev() 406 apr_size_t nbytes; local [all …]
|
| H A D | fullrw.c | 21 apr_size_t nbytes, in apr_file_read_full() argument 28 apr_size_t amt = nbytes; in apr_file_read_full() 32 nbytes -= amt; in apr_file_read_full() 34 } while (status == APR_SUCCESS && nbytes > 0); in apr_file_read_full() 44 apr_size_t nbytes, in apr_file_write_full() argument 51 apr_size_t amt = nbytes; in apr_file_write_full() 55 nbytes -= amt; in apr_file_write_full() 57 } while (status == APR_SUCCESS && nbytes > 0); in apr_file_write_full()
|
| /freebsd-13.1/sys/kern/ |
| H A D | vfs_extattr.c | 199 cnt = nbytes; in extattr_set_vp() 227 size_t nbytes; member 263 size_t nbytes; member 280 size_t nbytes; member 362 cnt = nbytes; in extattr_get_vp() 394 size_t nbytes; member 430 size_t nbytes; member 446 size_t nbytes; member 650 cnt = nbytes; in extattr_list_vp() 681 size_t nbytes; member [all …]
|
| /freebsd-13.1/lib/libc/stdio/ |
| H A D | fmemopen.c | 171 if (nbytes > ck->len - ck->off) in fmemopen_read() 172 nbytes = ck->len - ck->off; in fmemopen_read() 174 if (nbytes == 0) in fmemopen_read() 177 memcpy(buf, ck->buf + ck->off, nbytes); in fmemopen_read() 179 ck->off += nbytes; in fmemopen_read() 181 return (nbytes); in fmemopen_read() 189 if (nbytes > ck->size - ck->off) in fmemopen_write() 190 nbytes = ck->size - ck->off; in fmemopen_write() 192 if (nbytes == 0) in fmemopen_write() 197 ck->off += nbytes; in fmemopen_write() [all …]
|
| H A D | xprintf_str.c | 62 size_t clen, nbytes; in __wcsconv() local 68 nbytes = wcsrtombs(NULL, (const wchar_t **)&p, 0, &mbs); in __wcsconv() 69 if (nbytes == (size_t)-1) in __wcsconv() 78 nbytes = prec; in __wcsconv() 80 nbytes = 0; in __wcsconv() 86 (int)(nbytes + clen) > prec) in __wcsconv() 88 nbytes += clen; in __wcsconv() 92 if ((convbuf = malloc(nbytes + 1)) == NULL) in __wcsconv() 98 if ((nbytes = wcsrtombs(convbuf, (const wchar_t **)&p, in __wcsconv() 99 nbytes, &mbs)) == (size_t)-1) { in __wcsconv() [all …]
|
| /freebsd-13.1/sys/dev/random/fenestrasX/ |
| H A D | fx_brng.c | 166 size_t nbytes) in fxrng_brng_getbytes_internal() argument 172 if (__predict_false(nbytes == 0)) { in fxrng_brng_getbytes_internal() 179 memcpy(buf, &rng->brng_buffer[rng->brng_avail_idx], nbytes); in fxrng_brng_getbytes_internal() 181 rng->brng_avail_idx += nbytes; in fxrng_brng_getbytes_internal() 187 if (nbytes < sizeof(rng->brng_buffer)) { in fxrng_brng_getbytes_internal() 193 ASSERT_DEBUG(nbytes > rem, "invariant"); in fxrng_brng_getbytes_internal() 198 nbytes -= rem; in fxrng_brng_getbytes_internal() 199 ASSERT_DEBUG(nbytes != 0, "invariant"); in fxrng_brng_getbytes_internal() 211 memcpy(buf, &rng->brng_buffer[rng->brng_avail_idx], nbytes); in fxrng_brng_getbytes_internal() 213 rng->brng_avail_idx += nbytes; in fxrng_brng_getbytes_internal() [all …]
|
| /freebsd-13.1/lib/libc/db/btree/ |
| H A D | bt_split.c | 191 if (n < nbytes) { in __bt_split() 195 nbytes = n; in __bt_split() 203 nbytes = NRINTERNAL; in __bt_split() 522 u_int32_t nbytes; in bt_broot() local 533 nbytes = NBINTERNAL(0); in bt_broot() 605 u_int32_t nbytes; in bt_psplit() local 621 nbytes = ilen; in bt_psplit() 632 nbytes = NBLEAF(bl); in bt_psplit() 728 nbytes = NBLEAF(bl); in bt_psplit() 732 nbytes = NRINTERNAL; in bt_psplit() [all …]
|
| /freebsd-13.1/crypto/openssl/engines/ |
| H A D | e_padlock.c | 345 if (nbytes == 0) in padlock_cfb_cipher() 353 nbytes -= chunk; in padlock_cfb_cipher() 356 if (nbytes) { in padlock_cfb_cipher() 368 while (nbytes) { in padlock_cfb_cipher() 377 while (nbytes) { in padlock_cfb_cipher() 407 chunk++, nbytes--; in padlock_ofb_cipher() 413 if (nbytes == 0) in padlock_ofb_cipher() 421 nbytes -= chunk; in padlock_ofb_cipher() 424 if (nbytes) { in padlock_ofb_cipher() 433 while (nbytes) { in padlock_ofb_cipher() [all …]
|
| /freebsd-13.1/bin/sh/ |
| H A D | memalloc.c | 65 ckmalloc(size_t nbytes) in ckmalloc() argument 71 p = malloc(nbytes); in ckmalloc() 87 p = realloc(p, nbytes); in ckrealloc() 144 stnewblock(int nbytes) in stnewblock() argument 149 if (nbytes < MINSIZE) in stnewblock() 150 nbytes = MINSIZE; in stnewblock() 166 stalloc(int nbytes) in stalloc() argument 170 nbytes = ALIGN(nbytes); in stalloc() 172 stnewblock(nbytes); in stalloc() 174 stacknxt += nbytes; in stalloc() [all …]
|
| /freebsd-13.1/contrib/file/src/ |
| H A D | encoding.c | 80 size_t nbytes = b->flen; in file_encoding() local 97 if (nbytes > ms->encoding_max) in file_encoding() 98 nbytes = ms->encoding_max; in file_encoding() 106 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding() 158 from_ebcdic(buf, nbytes, nbuf); in file_encoding() 272 for (i = 0; i < nbytes; i++) { \ 362 for (i = 0; i < nbytes; i++) { in file_looks_utf8() 404 if (i >= nbytes) in file_looks_utf8() 468 if (nbytes < 2) in looks_ucs16() 507 if (nbytes < 4) in looks_ucs32() [all …]
|
| /freebsd-13.1/usr.sbin/fdread/ |
| H A D | fdread.c | 182 for (nbytes = 0; nbytes < mediasize;) { in doread() 183 if (lseek(fd, nbytes, SEEK_SET) != nbytes) in doread() 193 nbytes += rv; in doread() 203 if (lseek(fd, nbytes, SEEK_SET) != nbytes) in doread() 207 nbytes += rv; in doread() 210 nbytes / 1024); in doread() 268 nbytes, in doread() 269 nbytes + secsize - 1); in doread() 271 nbytes += secsize; in doread() 283 nbytes += rv; in doread() [all …]
|
| /freebsd-13.1/lib/libsecureboot/openpgp/ |
| H A D | dearmor.c | 44 dearmor(char *pem, size_t nbytes, size_t *len) in dearmor() argument 61 memmove(cp, ep, nbytes - (size_t)(ep - pem)); in dearmor() 62 nbytes -= (size_t)(ep - cp); in dearmor() 63 pem[nbytes] = '\0'; in dearmor() 71 memmove(cp, ep, nbytes - (size_t)(ep - pem)); in dearmor() 72 nbytes -= (size_t)(ep - cp); in dearmor() 73 pem[nbytes] = '\0'; in dearmor() 75 if ((po = decode_pem(pem, nbytes, &npo))) { in dearmor() 80 if ((bp = BIO_new_mem_buf(pem, (int)nbytes))) { in dearmor() 81 long llen = (long)nbytes; in dearmor()
|
| /freebsd-13.1/contrib/ntp/libntp/ |
| H A D | ntp_crypto_rnd.c | 30 arc4random_buf(void *buf, size_t nbytes); 33 evutil_secure_rng_get_bytes(void *buf, size_t nbytes); 36 arc4random_buf(void *buf, size_t nbytes) in arc4random_buf() argument 38 evutil_secure_rng_get_bytes(buf, nbytes); in arc4random_buf() 91 size_t nbytes in ntp_crypto_random_buf() argument 97 rc = RAND_bytes(buf, size2int_chk(nbytes)); in ntp_crypto_random_buf() 111 arc4random_buf(buf, nbytes); in ntp_crypto_random_buf()
|
| /freebsd-13.1/sys/netinet/libalias/ |
| H A D | alias_util.c | 76 int nbytes) in LibAliasInternetChecksum() argument 82 while (nbytes > 1) { in LibAliasInternetChecksum() 84 nbytes -= 2; in LibAliasInternetChecksum() 86 if (nbytes == 1) { in LibAliasInternetChecksum() 112 int nhdr, ntcp, nbytes; in TcpChecksum() local 122 nbytes = ntcp; in TcpChecksum() 124 while (nbytes > 1) { in TcpChecksum() 126 nbytes -= 2; in TcpChecksum() 128 if (nbytes == 1) { in TcpChecksum()
|
| /freebsd-13.1/libexec/rtld-elf/rtld-libc/ |
| H A D | rtld_libc.h | 82 #define pread(fd, buf, nbytes, offset) __sys_pread(fd, buf, nbytes, offset) argument 83 #define read(fd, buf, nbytes) __sys_read(fd, buf, nbytes) argument 86 #define _write(fd, buf, nbytes) __sys_write(fd, buf, nbytes) argument 87 #define write(fd, buf, nbytes) __sys_write(fd, buf, nbytes) argument
|
| /freebsd-13.1/lib/libc/locale/ |
| H A D | wcsnrtombs.c | 70 size_t nbytes; in __wcsnrtombs_std() local 74 nbytes = 0; in __wcsnrtombs_std() 82 return (nbytes + nb - 1); in __wcsnrtombs_std() 84 nbytes += nb; in __wcsnrtombs_std() 86 return (nbytes); in __wcsnrtombs_std() 118 return (nbytes + nb - 1); in __wcsnrtombs_std() 123 nbytes += nb; in __wcsnrtombs_std() 126 return (nbytes); in __wcsnrtombs_std()
|
| /freebsd-13.1/contrib/tcsh/ |
| H A D | tc.alloc.c | 177 malloc(size_t nbytes) in malloc() argument 198 nbytes++; in malloc() 201 nbytes = MEMALIGN(MEMALIGN(sizeof(union overhead)) + nbytes + RSLOP); in malloc() 202 shiftr = (nbytes - 1) >> 2; in malloc() 240 if (nbytes) in malloc() 386 realloc(ptr_t cp, size_t nbytes) in realloc() argument 396 return (malloc(nbytes)); in realloc() 423 nbytes = MEMALIGN(MEMALIGN(sizeof(union overhead))+nbytes+RSLOP); in realloc() 430 if ((res = malloc(nbytes)) == NULL) in realloc() 438 (void) memmove(res, cp, onb < nbytes ? onb : nbytes); in realloc() [all …]
|
| /freebsd-13.1/contrib/ntp/lib/isc/ |
| H A D | netaddr.c | 107 nbytes = prefixlen / 8; in isc_netaddr_eqprefix() 110 if (nbytes > 0) { in isc_netaddr_eqprefix() 116 INSIST(nbytes < ipabytes); in isc_netaddr_eqprefix() 118 bytea = pa[nbytes]; in isc_netaddr_eqprefix() 119 byteb = pb[nbytes]; in isc_netaddr_eqprefix() 237 nbytes = prefixlen / 8; in isc_netaddr_prefixok() 242 nbytes++; in isc_netaddr_prefixok() 244 if (memcmp(p + nbytes, zeros, ipbytes - nbytes) != 0) in isc_netaddr_prefixok() 270 nbytes = i; in isc_netaddr_masktoprefixlen() 272 unsigned int c = p[nbytes]; in isc_netaddr_masktoprefixlen() [all …]
|