/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/sbin/dmesg/ |
H A D | dmesg.c | 69 size_t buflen, bufpos; in main() local 140 bufpos = MSGBUF_SEQ_TO_POS(&cur, cur.msg_wseq); in main() 141 if (kvm_read(kd, (long)&cur.msg_ptr[bufpos], bp, in main() 142 cur.msg_size - bufpos) != (ssize_t)(cur.msg_size - bufpos)) in main() 144 if (bufpos != 0 && kvm_read(kd, (long)cur.msg_ptr, in main() 145 &bp[cur.msg_size - bufpos], bufpos) != (ssize_t)bufpos) in main()
|
/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/contrib/diff/src/ |
H A D | sdiff.c | 352 char *bufpos; member 361 lf->bufpos = lf->buffer = lf->buflim = xmalloc (SDIFF_BUFSIZE + 1); in lf_init() 370 lf->bufpos = lf->buffer; in lf_refill() 381 char *start = lf->bufpos; in lf_copy() 385 lf->bufpos = (char *) memchr (lf->bufpos, '\n', lf->buflim - lf->bufpos); in lf_copy() 386 if (! lf->bufpos) in lf_copy() 391 start = lf->bufpos; in lf_copy() 396 ++lf->bufpos; in lf_copy() 400 ck_fwrite (start, lf->bufpos - start, outfile); in lf_copy() 409 lf->bufpos = (char *) memchr (lf->bufpos, '\n', lf->buflim - lf->bufpos); in lf_skip() [all …]
|
/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; 760 bufpos = buffer;
|
/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 | 1058 drainbuf(int fd, unsigned char *buf, size_t *bufpos, int crlf) in drainbuf() argument 1060 ssize_t n = *bufpos, n2 = 0; in drainbuf() 1065 lf = memchr(buf, '\n', *bufpos); in drainbuf() 1086 adjust = *bufpos - n; in drainbuf() 1089 *bufpos -= n; in drainbuf() 1095 fillbuf(int fd, unsigned char *buf, size_t *bufpos) in fillbuf() argument 1097 size_t num = BUFSIZE - *bufpos; in fillbuf() 1100 n = read(fd, buf + *bufpos, num); in fillbuf() 1106 *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 | 964 drainbuf(int fd, unsigned char *buf, size_t *bufpos) in drainbuf() argument 969 n = write(fd, buf, *bufpos); in drainbuf() 976 adjust = *bufpos - n; in drainbuf() 979 *bufpos -= n; in drainbuf() 985 fillbuf(int fd, unsigned char *buf, size_t *bufpos) in fillbuf() argument 987 size_t num = BUFSIZE - *bufpos; in fillbuf() 990 n = read(fd, buf + *bufpos, num); in fillbuf() 996 *bufpos += n; in fillbuf()
|
/freebsd/lib/libfetch/ |
H A D | http.c | 136 size_t bufpos; /* current read offset in buffer */ member 229 io->bufpos = 0; in http_fillbuf() 254 io->bufpos = 0; in http_fillbuf() 282 if (!io->buf || io->bufpos == io->buflen) { in http_readfn() 292 rlen = io->buflen - io->bufpos; in http_readfn() 295 memcpy(buf, io->buf + io->bufpos, rlen); in http_readfn() 296 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;
|