Home
last modified time | relevance | path

Searched refs:bufpos (Results 1 – 15 of 15) 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/sbin/dmesg/
H A Ddmesg.c69 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 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/contrib/diff/src/
H A Dsdiff.c352 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 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;
760 bufpos = buffer;
/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.c1058 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 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.c964 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 Dhttp.c136 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 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;