Home
last modified time | relevance | path

Searched refs:bufpos (Results 1 – 16 of 16) sorted by relevance

/freebsd/sys/dev/bhnd/nvram/
H A Dbhnd_nvram_data_btxt.c144 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 Dbhnd_nvram_data_bcm.c181 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 Dfile.c55 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 Dlseek.c66 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 Ddmesg.c73 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 Dwork.c28 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 Dpflogd.c113 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 Dtestmode.c217 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 Dbio_asn1.c47 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 Dnetcat.c1059 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 Dtestmode.c400 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 Dnetcat.c960 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 Dtestmode.c541 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 Dhttp.c135 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 Dctf.c642 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 Dsm_resolve.c536 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;