| /freebsd/sys/dev/bhnd/nvram/ |
| H A D | bhnd_nvram_data_btxt.c | 144 size_t buflen, bufpos; in bhnd_nvram_btxt_getvar_direct() local 155 bufpos = 0; in bhnd_nvram_btxt_getvar_direct() 160 while ((offset - bufpos) < limit) { in bhnd_nvram_btxt_getvar_direct() 161 BHND_NV_ASSERT(bufpos <= buflen, in bhnd_nvram_btxt_getvar_direct() 162 ("buf position invalid (%zu > %zu)", bufpos, buflen)); in bhnd_nvram_btxt_getvar_direct() 167 if (buflen - bufpos == 0) { in bhnd_nvram_btxt_getvar_direct() 171 bufpos = 0; in bhnd_nvram_btxt_getvar_direct() 182 BHND_NV_ASSERT(bufpos < buflen, ("empty buffer!")); in bhnd_nvram_btxt_getvar_direct() 188 while (bufpos < buflen && bhnd_nv_isspace(buf[bufpos])) in bhnd_nvram_btxt_getvar_direct() 190 bufpos++; in bhnd_nvram_btxt_getvar_direct() [all …]
|
| H A D | bhnd_nvram_data_bcm.c | 181 size_t buflen, bufpos; in bhnd_nvram_bcm_getvar_direct_common() local 204 bufpos = 0; in bhnd_nvram_bcm_getvar_direct_common() 209 while ((offset - bufpos) < limit) { in bhnd_nvram_bcm_getvar_direct_common() 210 BHND_NV_ASSERT(bufpos <= buflen, in bhnd_nvram_bcm_getvar_direct_common() 211 ("buf position invalid (%zu > %zu)", bufpos, buflen)); in bhnd_nvram_bcm_getvar_direct_common() 216 if (buflen - bufpos == 0) { in bhnd_nvram_bcm_getvar_direct_common() 220 bufpos = 0; in bhnd_nvram_bcm_getvar_direct_common() 231 BHND_NV_ASSERT(buflen - bufpos > 0, ("empty buffer!")); in bhnd_nvram_bcm_getvar_direct_common() 234 if (buf[bufpos] == '\0') in bhnd_nvram_bcm_getvar_direct_common() 248 navail = bhnd_nv_ummin(buflen - bufpos, nleft); in bhnd_nvram_bcm_getvar_direct_common() [all …]
|
| /freebsd/usr.bin/grep/ |
| H A D | file.c | 55 static char *bufpos; variable 70 bufpos = buffer; in grep_refill() 110 return (bufpos); in grep_fgetln() 114 if ((p = memchr(bufpos, fileeol, bufrem)) != NULL) { in grep_fgetln() 116 len = p - bufpos; in grep_fgetln() 119 memcpy(lnbuf, bufpos, len); in grep_fgetln() 121 bufpos = p; in grep_fgetln() 132 memcpy(lnbuf + off, bufpos, len - off); in grep_fgetln() 145 if ((p = memchr(bufpos, fileeol, bufrem)) == NULL) in grep_fgetln() 149 diff = p - bufpos; in grep_fgetln() [all …]
|
| /freebsd/stand/libsa/ |
| H A D | lseek.c | 66 off_t bufpos, filepos, target; in lseek() local 105 bufpos = filepos - f->f_ralen; in lseek() 111 target = bufpos + offset; in lseek() 117 if (bufpos <= target && target < filepos) { in lseek() 118 f->f_raoffset += target - bufpos; in lseek() 119 f->f_ralen -= target - bufpos; in lseek()
|
| /freebsd/sbin/dmesg/ |
| H A D | dmesg.c | 73 size_t buflen, bufpos; in main() local 159 bufpos = MSGBUF_SEQ_TO_POS(&cur, cur.msg_wseq); in main() 160 if (kvm_read(kd, (long)&cur.msg_ptr[bufpos], bp, in main() 161 cur.msg_size - bufpos) != (ssize_t)(cur.msg_size - bufpos)) in main() 163 if (bufpos != 0 && kvm_read(kd, (long)cur.msg_ptr, in main() 164 &bp[cur.msg_size - bufpos], bufpos) != (ssize_t)bufpos) in main()
|
| /freebsd/contrib/ldns/drill/ |
| H A D | work.c | 28 size_t bufpos = 0; in hexstr2bin() local 53 if (bufpos + offset + 1 <= buf_len) { in hexstr2bin() 54 buf[bufpos+offset] = int8; in hexstr2bin() 57 bufpos++; in hexstr2bin() 64 return bufpos; in hexstr2bin()
|
| /freebsd/contrib/pf/pflogd/ |
| H A D | pflogd.c | 113 static char *bufpos = NULL; /* position in buffer */ variable 542 int len = bufpos - buffer; 564 bufpos = buffer; 577 bufpos = buffer; 626 memcpy(bufpos, &sh, sizeof(sh)); 627 memcpy(bufpos + sizeof(sh), sp, h->caplen); 629 memcpy(bufpos, h, sizeof(*h)); 630 memcpy(bufpos + sizeof(*h), sp, h->caplen); 633 bufpos += len; 752 bufpos = buffer;
|
| /freebsd/sys/contrib/dev/athk/ath12k/ |
| H A D | testmode.c | 217 u8 segnumber = 0, *bufpos; in ath12k_tm_cmd_process_ftm() local 233 bufpos = buf; in ath12k_tm_cmd_process_ftm() 264 memcpy(&ftm_cmd->data, bufpos, chunk_len); in ath12k_tm_cmd_process_ftm() 274 bufpos += chunk_len; in ath12k_tm_cmd_process_ftm()
|
| /freebsd/crypto/openssl/crypto/asn1/ |
| H A D | bio_asn1.c | 47 int bufpos; member 201 ret = BIO_write(next, ctx->buf + ctx->bufpos, ctx->buflen); in asn1_bio_write() 207 ctx->bufpos += ret; in asn1_bio_write() 209 ctx->bufpos = 0; in asn1_bio_write()
|
| /freebsd/contrib/netcat/ |
| H A D | netcat.c | 1059 drainbuf(int fd, unsigned char *buf, size_t *bufpos, int crlf) in drainbuf() argument 1061 ssize_t n = *bufpos, n2 = 0; in drainbuf() 1066 lf = memchr(buf, '\n', *bufpos); in drainbuf() 1087 adjust = *bufpos - n; in drainbuf() 1090 *bufpos -= n; in drainbuf() 1096 fillbuf(int fd, unsigned char *buf, size_t *bufpos) in fillbuf() argument 1098 size_t num = BUFSIZE - *bufpos; in fillbuf() 1101 n = read(fd, buf + *bufpos, num); in fillbuf() 1107 *bufpos += n; in fillbuf()
|
| /freebsd/sys/contrib/dev/athk/ath11k/ |
| H A D | testmode.c | 400 u8 *bufpos; in ath11k_tm_cmd_wmi_ftm() local 426 bufpos = buf; in ath11k_tm_cmd_wmi_ftm() 455 memcpy(&ftm_cmd->data, bufpos, chunk_len); in ath11k_tm_cmd_wmi_ftm() 464 bufpos += chunk_len; in ath11k_tm_cmd_wmi_ftm()
|
| /freebsd/crypto/openssh/regress/ |
| H A D | netcat.c | 960 drainbuf(int fd, unsigned char *buf, size_t *bufpos) in drainbuf() argument 965 n = write(fd, buf, *bufpos); in drainbuf() 972 adjust = *bufpos - n; in drainbuf() 975 *bufpos -= n; in drainbuf() 981 fillbuf(int fd, unsigned char *buf, size_t *bufpos) in fillbuf() argument 983 size_t num = BUFSIZE - *bufpos; in fillbuf() 986 n = read(fd, buf + *bufpos, num); in fillbuf() 992 *bufpos += n; in fillbuf()
|
| /freebsd/sys/contrib/dev/athk/ath10k/ |
| H A D | testmode.c | 541 u8 *bufpos; in ath10k_tm_cmd_tlv() local 561 bufpos = buf; in ath10k_tm_cmd_tlv() 595 memcpy(&ftm_cmd->data, bufpos, chunk_len); in ath10k_tm_cmd_tlv() 604 bufpos += chunk_len; in ath10k_tm_cmd_tlv()
|
| /freebsd/lib/libfetch/ |
| H A D | http.c | 135 size_t bufpos; /* current read offset in buffer */ member 225 io->bufpos = 0; in http_fillbuf() 250 io->bufpos = 0; in http_fillbuf() 278 if (!io->buf || io->bufpos == io->buflen) { in http_readfn() 288 rlen = io->buflen - io->bufpos; in http_readfn() 291 memcpy(buf, io->buf + io->bufpos, rlen); in http_readfn() 292 io->bufpos += rlen; in http_readfn()
|
| /freebsd/cddl/contrib/opensolaris/tools/ctf/cvt/ |
| H A D | ctf.c | 642 caddr_t bufpos; in write_buffer() local 647 bufpos = outbuf; in write_buffer() 648 (void) bcopy_data(h, sizeof (ctf_header_t), &bufpos); in write_buffer() 650 &bufpos); in write_buffer() 651 (void) strtab_write(&buf->ctb_strtab, bcopy_data, &bufpos); in write_buffer() 652 *resszp = bufpos - outbuf; in write_buffer()
|
| /freebsd/contrib/sendmail/src/ |
| H A D | sm_resolve.c | 536 gen_dns_reply(buf, buflen, bufpos, query, qtype, domain, class, type, ttl, size, data, txtlen, pref… in gen_dns_reply() argument 539 unsigned char *bufpos; 575 if (bufpos != NULL) 576 cp = bufpos;
|