Home
last modified time | relevance | path

Searched refs:resid (Results 1 – 25 of 191) sorted by relevance

12345678

/freebsd/sys/crypto/
H A Dchacha20_poly1305.c44 size_t resid, todo; in chacha20_poly1305_encrypt() local
57 resid = src_len; in chacha20_poly1305_encrypt()
58 todo = rounddown2(resid, CHACHA20_NATIVE_BLOCK_LEN); in chacha20_poly1305_encrypt()
64 resid -= todo; in chacha20_poly1305_encrypt()
66 if (resid > 0) { in chacha20_poly1305_encrypt()
67 exf->encrypt_last(ctx, src, dst, resid); in chacha20_poly1305_encrypt()
68 exf->update(ctx, dst, resid); in chacha20_poly1305_encrypt()
69 dst += resid; in chacha20_poly1305_encrypt()
70 if (resid % POLY1305_BLOCK_LEN != 0) in chacha20_poly1305_encrypt()
72 POLY1305_BLOCK_LEN - resid % POLY1305_BLOCK_LEN); in chacha20_poly1305_encrypt()
[all …]
/freebsd/lib/libc/stdio/
H A Dfread.c64 size_t resid; in __fread() local
92 resid = count * size; in __fread()
96 total = resid; in __fread()
105 while (resid > 0) { in __fread()
108 fp->_bf._size = resid; in __fread()
112 count = (total - resid) / size; in __fread()
116 resid -= fp->_r; in __fread()
127 while (resid > (r = fp->_r)) { in __fread()
133 resid -= r; in __fread()
137 return ((total - resid) / size); in __fread()
[all …]
/freebsd/stand/libsa/
H A Dread.c68 size_t resid; in read() local
80 btodb(f->f_offset), bcount, dest, &resid); in read()
83 f->f_offset += resid; in read()
85 return (resid); in read()
94 resid = bcount; in read()
98 ccount = imin(f->f_ralen, resid); in read()
103 resid -= ccount; in read()
104 if (resid == 0) { in read()
112 if (f->f_rabuf == NULL || resid >= SOPEN_RASIZE) { in read()
117 errno = (f->f_ops->fo_read)(f, dest, resid, &cresid); in read()
[all …]
H A Dwrite.c68 size_t resid; in write() local
79 &resid); in write()
82 f->f_offset += resid; in write()
83 return (resid); in write()
85 resid = bcount; in write()
86 if ((errno = (f->f_ops->fo_write)(f, dest, bcount, &resid))) in write()
88 return (bcount - resid); in write()
H A Dsplitfs.c47 static int splitfs_read(struct open_file *f, void *buf, size_t size, size_t *resid);
191 splitfs_read(struct open_file *f, void *buf, size_t size, size_t *resid) in splitfs_read() argument
226 if (resid != NULL) in splitfs_read()
227 *resid = size - totread; in splitfs_read()
236 size_t resid; in splitfs_seek() local
273 resid = 0; in splitfs_seek()
274 errno = splitfs_read(f, tmp, min(seek_by, SEEK_BUF), &resid); in splitfs_seek()
275 nread = min(seek_by, SEEK_BUF) - resid; in splitfs_seek()
/freebsd/contrib/sendmail/libsm/
H A Dfread.c47 register size_t resid = size; variable
65 if (resid == 0)
70 while ((int) resid > (r = fp->f_r))
76 resid -= r;
88 return size - resid;
93 return size - resid;
96 (void) memcpy((void *) p, (void *) fp->f_p, resid);
97 fp->f_r -= resid;
98 fp->f_p += resid;
/freebsd/sys/crypto/openssl/
H A Dossl_chacha20.c65 size_t resid, todo, inlen, outlen; in ossl_chacha20() local
79 resid = crp->crp_payload_length; in ossl_chacha20()
89 while (resid >= CHACHA_BLK_SIZE) { in ossl_chacha20()
103 todo = rounddown(MIN(resid, MIN(inlen, outlen)), in ossl_chacha20()
139 resid -= todo; in ossl_chacha20()
142 if (resid > 0) { in ossl_chacha20()
144 crypto_cursor_copydata(&cc_in, resid, block); in ossl_chacha20()
146 crypto_cursor_copyback(&cc_out, resid, block); in ossl_chacha20()
167 size_t resid, todo, inlen, outlen; in ossl_chacha20_poly1305_encrypt() local
207 resid = crp->crp_payload_length; in ossl_chacha20_poly1305_encrypt()
[all …]
/freebsd/sys/opencrypto/
H A Dcryptosoft.c106 int blksz, resid; in swcr_encdec() local
161 for (resid = crp->crp_payload_length; resid >= blksz; resid -= todo) { in swcr_encdec()
182 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), blksz); in swcr_encdec()
208 if (resid > 0) { in swcr_encdec()
211 __func__, resid, exf->name)); in swcr_encdec()
212 KASSERT(resid < blksz, ("%s: partial block too big", __func__)); in swcr_encdec()
216 if (inlen < resid) { in swcr_encdec()
217 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_encdec()
220 if (outlen < resid) in swcr_encdec()
224 resid); in swcr_encdec()
[all …]
/freebsd/stand/libofw/
H A Dofw_copy.c49 size_t resid; in ofw_mapmem() local
74 resid = dest & PAGE_MASK; in ofw_mapmem()
80 if ((nlen + resid) < PAGE_SIZE*MAPMEM_PAGE_INC) { in ofw_mapmem()
83 dlen = roundup(nlen + resid, PAGE_SIZE); in ofw_mapmem()
136 size_t resid, chunk, get; in ofw_readin() local
155 for (resid = len; resid > 0; resid -= got, p += got) { in ofw_readin()
156 get = min(chunk, resid); in ofw_readin()
169 return (len - resid); in ofw_readin()
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/
H A Dzfs_file_os.c78 zfs_file_write(zfs_file_t *fp, const void *buf, size_t count, ssize_t *resid) in zfs_file_write() argument
89 if (resid) { in zfs_file_write()
90 *resid = count - rc; in zfs_file_write()
111 uint8_t ashift, ssize_t *resid) in zfs_file_pwrite() argument
120 if (resid) { in zfs_file_pwrite()
121 *resid = count - rc; in zfs_file_pwrite()
141 zfs_file_read(zfs_file_t *fp, void *buf, size_t count, ssize_t *resid) in zfs_file_read() argument
152 if (resid) { in zfs_file_read()
153 *resid = count - rc; in zfs_file_read()
174 ssize_t *resid) in zfs_file_pread() argument
[all …]
/freebsd/tests/sys/file/
H A Dfspacectl_test.c90 off_t offset, resid; in check_content_dealloc() local
113 resid = hole_len; in check_content_dealloc()
114 while (resid > 0) { in check_content_dealloc()
115 blen = resid < (off_t)blocksize ? resid : blocksize; in check_content_dealloc()
124 resid -= blen; in check_content_dealloc()
134 resid = hole_start; in check_content_dealloc()
135 while (resid > 0) { in check_content_dealloc()
136 blen = resid < (off_t)blocksize ? resid : blocksize; in check_content_dealloc()
145 resid -= blen; in check_content_dealloc()
153 resid = file_sz - offset; in check_content_dealloc()
[all …]
/freebsd/sys/dev/cfi/
H A Dcfi_disk.c172 long resid; in cfi_disk_read() local
189 resid = bp->bio_bcount; in cfi_disk_read()
192 while (resid > 0 && bp->bio_offset < sc->sc_size) { in cfi_disk_read()
194 bp->bio_offset += 1, resid -= 1; in cfi_disk_read()
198 while (resid > 0 && bp->bio_offset < sc->sc_size) { in cfi_disk_read()
200 bp->bio_offset += 2, resid -= 2; in cfi_disk_read()
204 while (resid > 0 && bp->bio_offset < sc->sc_size) { in cfi_disk_read()
206 bp->bio_offset += 4, resid -= 4; in cfi_disk_read()
209 bp->bio_resid = resid; in cfi_disk_read()
217 long resid; in cfi_disk_write() local
[all …]
/freebsd/sys/contrib/openzfs/lib/libzpool/
H A Dzfs_file_os.c113 zfs_file_write(zfs_file_t *fp, const void *buf, size_t count, ssize_t *resid) in zfs_file_write() argument
121 if (resid) { in zfs_file_write()
122 *resid = count - rc; in zfs_file_write()
143 size_t count, loff_t pos, uint8_t ashift, ssize_t *resid) in zfs_file_pwrite() argument
177 if (resid) { in zfs_file_pwrite()
178 *resid = count - done; in zfs_file_pwrite()
198 zfs_file_read(zfs_file_t *fp, void *buf, size_t count, ssize_t *resid) in zfs_file_read() argument
206 if (resid) { in zfs_file_read()
207 *resid = count - rc; in zfs_file_read()
228 ssize_t *resid) in zfs_file_pread() argument
[all …]
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/
H A Dzfs_file_os.c118 ssize_t *resid) in zfs_file_write_impl() argument
145 if (resid) in zfs_file_write_impl()
146 *resid = auio.uio_resid; in zfs_file_write_impl()
154 zfs_file_write(zfs_file_t *fp, const void *buf, size_t count, ssize_t *resid) in zfs_file_write() argument
159 rc = zfs_file_write_impl(fp, buf, count, &off, resid); in zfs_file_write()
168 uint8_t ashift, ssize_t *resid) in zfs_file_pwrite() argument
171 return (zfs_file_write_impl(fp, buf, count, &off, resid)); in zfs_file_pwrite()
176 ssize_t *resid) in zfs_file_read_impl() argument
200 if (resid) in zfs_file_read_impl()
201 *resid = auio.uio_resid; in zfs_file_read_impl()
[all …]
/freebsd/usr.sbin/bhyve/
H A Diov.c54 size_t count, resid; in split_iov() local
57 resid = offset; in split_iov()
59 if (resid < iov[count].iov_len) in split_iov()
61 resid -= iov[count].iov_len; in split_iov()
64 if (resid == 0 || count == *niov1) { in split_iov()
77 iov[count].iov_len = resid; in split_iov()
78 iov[count + 1].iov_base = (char *)iov[count].iov_base + resid; in split_iov()
79 iov[count + 1].iov_len -= resid; in split_iov()
/freebsd/sys/netsmb/
H A Dsmb_smb.c630 u_int32_t resid; in smb_smb_readx() local
681 resid = (residhi << 16) | residlo; in smb_smb_readx()
688 if (resid == 0) { in smb_smb_readx()
689 *rresid = resid; in smb_smb_readx()
692 error = md_get_uio(mdp, uio, resid); in smb_smb_readx()
695 *rresid = resid; in smb_smb_readx()
710 u_int16_t resid; in smb_smb_writex() local
750 md_get_uint16le(mdp, &resid); in smb_smb_writex()
751 *rresid = resid; in smb_smb_writex()
765 u_int16_t resid, bc; in smb_smb_read() local
[all …]
/freebsd/tools/tools/intel-ucode-split/
H A Dintel-ucode-split.c122 size_t len, resid; in main() local
170 resid = (hdr.total_size != 0 ? hdr.total_size : 2048) - in main()
172 if (resid > 1 << 24) /* Arbitrary chosen maximum size. */ in main()
176 if (lseek(ifd, resid, SEEK_CUR) == -1) in main()
197 while (resid > 0) { in main()
198 len = resid < bufsize ? resid : bufsize; in main()
206 resid -= len; in main()
/freebsd/sys/ufs/ffs/
H A Dffs_rawread.c259 long resid; in ffs_rawread_main() local
265 resid = uio->uio_resid; in ffs_rawread_main()
274 while (resid > 0) { in ffs_rawread_main()
280 resid, td, bp); in ffs_rawread_main()
284 if (resid > bp->b_bufsize) { /* Setup first readahead */ in ffs_rawread_main()
298 resid - in ffs_rawread_main()
325 resid -= iolen; in ffs_rawread_main()
344 if (resid <= bp->b_bufsize) { /* No more readaheads */ in ffs_rawread_main()
354 resid - in ffs_rawread_main()
366 } else if (resid > 0) { /* More to read, no readahead */ in ffs_rawread_main()
[all …]
/freebsd/cddl/contrib/opensolaris/tools/ctf/cvt/
H A Dstrtab.c111 size_t resid, n; in strtab_compare() local
118 resid = sp->str_bufs[b] + sp->str_bufsz - buf; in strtab_compare()
119 n = MIN(resid, len); in strtab_compare()
136 size_t resid, n; in strtab_copyin() local
144 resid = sp->str_bufs[b] + sp->str_bufsz - sp->str_ptr; in strtab_copyin()
145 n = MIN(resid, len); in strtab_copyin()
240 size_t resid, len, n; in strtab_print() local
248 resid = sp->str_bufs[b] + sp->str_bufsz - buf; in strtab_print()
249 n = MIN(resid, len); in strtab_print()
/freebsd/usr.bin/wall/
H A Dttymsg.c63 size_t resid; in ttymsg() local
103 for (cnt = 0, resid = 0; cnt < iovcnt; ++cnt) in ttymsg()
104 resid += iov[cnt].iov_len; in ttymsg()
109 resid -= wret; in ttymsg()
165 } while (resid > 0); in ttymsg()
/freebsd/sys/contrib/openzfs/lib/libspl/
H A Drandom.c64 size_t resid = len; in random_get_bytes_common() local
69 while (resid != 0) { in random_get_bytes_common()
70 bytes = read(fd, ptr, resid); in random_get_bytes_common()
73 resid -= bytes; in random_get_bytes_common()
/freebsd/sbin/nvmecontrol/modules/wdc/
H A Dwdc.c169 size_t resid; in wdc_do_dump_e6() local
199 resid = MIN(len, max_xfer_size); in wdc_do_dump_e6()
200 wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid, e6lg_flag); in wdc_do_dump_e6()
214 if (resid > len) in wdc_do_dump_e6()
215 resid = len; in wdc_do_dump_e6()
218 if (write(fd2, buf, resid) != (ssize_t)resid) in wdc_do_dump_e6()
220 offset += resid; in wdc_do_dump_e6()
221 len -= resid; in wdc_do_dump_e6()
329 size_t resid; in wdc_do_dump_dui() local
347 resid = MIN(log_len, max_xfer_size); in wdc_do_dump_dui()
[all …]
/freebsd/sys/contrib/openzfs/include/sys/
H A Dzfs_file.h49 int zfs_file_write(zfs_file_t *fp, const void *buf, size_t len, ssize_t *resid);
51 uint8_t ashift, ssize_t *resid);
52 int zfs_file_read(zfs_file_t *fp, void *buf, size_t len, ssize_t *resid);
54 ssize_t *resid);
/freebsd/sys/x86/x86/
H A Ducode.c56 size_t resid);
169 ucode_intel_verify(const struct ucode_intel_header *hdr, size_t resid) in ucode_intel_verify() argument
175 if (resid < sizeof(struct ucode_intel_header)) in ucode_intel_verify()
186 if (resid < size) in ucode_intel_verify()
205 size_t resid; in ucode_intel_match() local
214 for (resid = *len; resid > 0; data += total_size, resid -= total_size) { in ucode_intel_match()
216 if (ucode_intel_verify(hdr, resid) != 0) { in ucode_intel_match()
/freebsd/crypto/krb5/src/lib/krb5/keytab/
H A Dktbase.c157 const char *cp, *resid; in krb5_kt_resolve() local
175 resid = name; in krb5_kt_resolve()
180 resid = name; in krb5_kt_resolve()
182 resid = name + pfxlen + 1; in krb5_kt_resolve()
198 err = (*tlist->ops->resolve)(context, resid, &id); in krb5_kt_resolve()

12345678