/illumos-gate/usr/src/uts/common/fs/smbsrv/ |
H A D | smb_mbuf_util.c | 151 while (nbytes) { in smb_mbuf_get() 152 count = (nbytes > MCLBYTES) ? MCLBYTES : nbytes; in smb_mbuf_get() 153 nbytes -= count; in smb_mbuf_get() 251 ASSERT(nbytes > 0); in smb_mbuf_alloc_chain() 261 nbytes -= len; in smb_mbuf_alloc_chain() 265 len = nbytes; in smb_mbuf_alloc_chain() 272 nbytes -= len; in smb_mbuf_alloc_chain() 275 len = nbytes; in smb_mbuf_alloc_chain() 286 nbytes -= len; in smb_mbuf_alloc_chain() 368 m->m_len = nbytes; in smb_mbuf_trim() [all …]
|
H A D | smb_echo.c | 58 unsigned short nbytes; in smb_com_echo() local 77 nbytes = sr->smb_bcc; in smb_com_echo() 78 data = smb_srm_zalloc(sr, nbytes); in smb_com_echo() 80 if (smb_mbc_decodef(&sr->smb_data, "#c", nbytes, data)) in smb_com_echo() 92 MBC_INIT(&reply, SMB_HEADER_ED_LEN + 10 + nbytes); in smb_com_echo() 109 nbytes, nbytes, data); in smb_com_echo()
|
/illumos-gate/usr/src/uts/common/fs/ufs/ |
H A D | ufs_extvnops.c | 134 nbytes = MIN((pplen - curlen), in ufs_rdwr_data() 136 ASSERT(nbytes > 0); in ufs_rdwr_data() 150 offset1 += nbytes; in ufs_rdwr_data() 151 curlen += nbytes; in ufs_rdwr_data() 309 uoff, nbytes)); in ufs_alloc_data() 311 if (uoff + nbytes > ip->i_size) { in ufs_alloc_data() 319 ip->i_size, uoff + nbytes)); in ufs_alloc_data() 337 nbytes); in ufs_alloc_data() 389 UFS_SET_ISIZE(uoff + nbytes, ip); in ufs_alloc_data() 466 nbytes); in ufs_alloc_data() [all …]
|
/illumos-gate/usr/src/cmd/mdb/common/mdb/ |
H A D | mdb_rawfile.c | 123 if ((rbytes = IOP_READ(io, buf, nbytes)) == 0) in rf_read() 138 return (IOP_WRITE(io, buf, nbytes)); in rf_write() 183 return (rf_read(RF_CORE(t->t_data), buf, nbytes, addr)); in rf_vread() 185 return (rf_read(RF_OBJECT(t->t_data), buf, nbytes, addr)); in rf_vread() 192 return (rf_write(RF_CORE(t->t_data), buf, nbytes, addr)); in rf_vwrite() 194 return (rf_write(RF_OBJECT(t->t_data), buf, nbytes, addr)); in rf_vwrite() 201 return (rf_read(RF_CORE(t->t_data), buf, nbytes, addr)); in rf_pread() 203 return (rf_read(RF_OBJECT(t->t_data), buf, nbytes, addr)); in rf_pread() 210 return (rf_write(RF_CORE(t->t_data), buf, nbytes, addr)); in rf_pwrite() 212 return (rf_write(RF_OBJECT(t->t_data), buf, nbytes, addr)); in rf_pwrite() [all …]
|
H A D | mdb_memio.c | 42 memio_read(mdb_io_t *io, void *buf, size_t nbytes) in memio_read() argument 47 if (mdp->md_off + nbytes > mdp->md_size) in memio_read() 48 nbytes = (mdp->md_size - mdp->md_off); in memio_read() 49 bcopy(mdp->md_buf + mdp->md_off, buf, nbytes); in memio_read() 50 mdp->md_off += nbytes; in memio_read() 51 return (nbytes); in memio_read() 54 return (IOP_READ(io->io_next, buf, nbytes)); in memio_read()
|
H A D | mdb_pipeio.c | 75 pio_read(mdb_io_t *io, void *buf, size_t nbytes) in pio_read() argument 80 if (nbytes == 0) in pio_read() 83 for (nleft = nbytes; nleft == nbytes; nleft -= n) { in pio_read() 130 if (nleft == nbytes) { in pio_read() 137 return (nbytes - nleft); in pio_read() 141 pio_write(mdb_io_t *io, const void *buf, size_t nbytes) in pio_write() argument 149 for (nleft = nbytes; nleft != 0; nleft -= n) { in pio_write() 191 if (nleft == nbytes && nbytes != 0) in pio_write() 194 return (nbytes - nleft); in pio_write()
|
/illumos-gate/usr/src/lib/libc/port/stdio/ |
H A D | open_wmemstream.c | 48 size_t nbytes __unused) in open_wmemstream_read() 55 open_wmemstream_write(FILE *iop, const char *buf, size_t nbytes) in open_wmemstream_write() argument 69 nbytes = MIN(nbytes, WMEMSTREAM_MAX); in open_wmemstream_write() 70 ret = memstream_newsize(wmemp->wmstr_pos, wmemp->wmstr_alloc, nbytes, in open_wmemstream_write() 87 while (nbytes > 0) { in open_wmemstream_write() 91 &buf[nwritten], nbytes, &wmemp->wmstr_mbs); in open_wmemstream_write() 107 nwritten += nbytes; in open_wmemstream_write() 108 nbytes = 0; in open_wmemstream_write() 111 nbytes -= nchars; in open_wmemstream_write()
|
H A D | open_memstream.c | 83 memstream_newsize(size_t pos, size_t alloc, size_t nbytes, size_t *nallocp) in memstream_newsize() argument 85 size_t npos = pos + nbytes + 1; in memstream_newsize() 118 size_t nbytes __unused) in open_memstream_read() 125 open_memstream_write(FILE *iop, const char *buf, size_t nbytes) in open_memstream_write() argument 135 nbytes = MIN(nbytes, SSIZE_MAX); in open_memstream_write() 136 ret = memstream_newsize(memp->mstr_pos, memp->mstr_alloc, nbytes, in open_memstream_write() 152 (void) memcpy(&memp->mstr_buf[memp->mstr_pos], buf, nbytes); in open_memstream_write() 153 memp->mstr_pos += nbytes; in open_memstream_write() 161 return (nbytes); in open_memstream_write()
|
/illumos-gate/usr/src/cmd/pools/poolstat/ |
H A D | poolstat_utils.c | 36 Realloc(void *ptr, size_t nbytes) in Realloc() argument 38 if ((ptr = realloc(ptr, nbytes))) in Realloc() 46 Zalloc(size_t nbytes) in Zalloc() argument 48 return (memset(Realloc(NULL, nbytes), 0, nbytes)); in Zalloc()
|
H A D | poolstat_utils.h | 36 #define REALLOC(p, nbytes) Realloc((p), (nbytes)) argument 37 #define ZALLOC(nbytes) Zalloc((nbytes)) argument
|
/illumos-gate/usr/src/cmd/svr4pkg/libinst/ |
H A D | copyf.c | 309 ssize_t nbytes; in copyFile() local 313 nbytes = write(a_dstFd, cp, mapsize); in copyFile() 321 if ((nbytes >= 0) && (nbytes != (ssize_t)mapsize)) { in copyFile() 324 remains = mapsize - nbytes; in copyFile() 326 nbytes = write(a_dstFd, in copyFile() 328 if (nbytes >= 0) { in copyFile() 329 remains -= nbytes; in copyFile() 331 nbytes = mapsize; in copyFile() 360 if (nbytes < 0) { in copyFile() 374 filesize -= nbytes; in copyFile() [all …]
|
/illumos-gate/usr/src/cmd/mdb/intel/kmdb/ |
H A D | kvm_isadep.c | 198 kmt_io_check(uint64_t nbytes, uintptr_t addr, int dowarn) in kmt_io_check() argument 206 if (nbytes != 1 && nbytes != 2 && nbytes != 4) { in kmt_io_check() 212 if ((addr & (nbytes - 1)) != 0) { in kmt_io_check() 215 "aligned\n", (u_longlong_t)nbytes, in kmt_io_check() 216 (u_longlong_t)nbytes); in kmt_io_check() 355 (nbytes = kmdb_kdi_range_is_nontoxic(addr, nbytes, 1)) == 0) in kmt_write() 378 if (kmt_io_check(nbytes, addr, IOCHECK_NOWARN) < 0) in kmt_iorw() 387 iorw(buf, nbytes, addr); in kmt_iorw() 390 return (nbytes); in kmt_iorw() 397 return (kmt_iorw(t, buf, nbytes, addr, kmt_in)); in kmt_ioread() [all …]
|
/illumos-gate/usr/src/cmd/logadm/ |
H A D | err.h | 61 #define MALLOC(nbytes) err_malloc(nbytes, __FILE__, __LINE__) argument 62 void *err_malloc(int nbytes, const char *fname, int line); 64 #define REALLOC(ptr, nbytes) err_realloc(ptr, nbytes, __FILE__, __LINE__) argument 65 void *err_realloc(void *ptr, int nbytes, const char *fname, int line);
|
/illumos-gate/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/ |
H A D | libfruaccess.c | 65 size_t nbytes, door_cred_t *cred); 67 size_t nbytes, segment_hdl_t *newsegment, 73 size_t nbytes, packet_hdl_t *newpacket, door_cred_t *cred); 75 const void *payload, size_t nbytes, 291 readsegment.fru_cnt = nbytes; in fru_read_segment() 311 writesegment.fru_cnt = nbytes; in fru_write_segment() 361 fru_get_payload(packet_hdl_t packet, void *buffer, size_t nbytes, in fru_get_payload() argument 371 payload.fru_cnt = nbytes; in fru_get_payload() 396 payload.fru_cnt = nbytes; in fru_update_payload() 408 size_t nbytes, segment_hdl_t *newsegment, door_cred_t *cred) in fru_append_packet() argument [all …]
|
/illumos-gate/usr/src/lib/libkvm/common/ |
H A D | test.c | 257 tst_read(uintptr_t addr, void *buf, size_t nbytes) in tst_read() argument 263 printf("kvm_read(%lx, [buf], %lu)\n", addr, nbytes); in tst_read() 264 if ((e = kvm_read(cookie, addr, buf, nbytes)) != nbytes) in tst_read() 266 e, nbytes); in tst_read() 267 for (b = buf, i = 0; i < nbytes; b++, i++) in tst_read() 275 tst_write(uintptr_t addr, void *buf, size_t nbytes) in tst_write() argument 282 if ((e = kvm_write(cookie, addr, buf, nbytes)) != nbytes) in tst_write() 284 e, nbytes); in tst_write() 285 if ((b = malloc(nbytes)) == 0) in tst_write() 288 if ((i = kvm_read(cookie, addr, b, nbytes)) != nbytes) in tst_write() [all …]
|
/illumos-gate/usr/src/lib/libnsl/dial/ |
H A D | interface.c | 155 tread(int fd, char *buf, unsigned nbytes) in tread() argument 159 return ((ssize_t)t_rcv(fd, buf, nbytes, &rcvflags)); in tread() 167 twrite(int fd, char *buf, unsigned nbytes) in twrite() argument 188 if (info.tsdu <= 0 || nbytes <= info.tsdu) in twrite() 189 return ((ssize_t)t_snd(fd, buf, nbytes, 0)); in twrite() 193 while (nbytes >= info.tsdu) { in twrite() 197 nbytes -= info.tsdu; in twrite() 199 if (nbytes != 0) { in twrite() 200 if ((ret = t_snd(fd, &buf[i], nbytes, 0)) != nbytes) in twrite() 202 i += nbytes; in twrite()
|
/illumos-gate/usr/src/lib/libnsl/nsl/ |
H A D | t_sndv.c | 53 unsigned int bytes_sent, bytes_remaining, bytes_to_send, nbytes; in _tx_sndv() local 112 nbytes = _t_bytecount_upto_intmax(tiov, tiovcount); in _tx_sndv() 115 (nbytes > (uint32_t)tsdu_limit)) { in _tx_sndv() 139 if (nbytes == 0 && !(tiptr->ti_prov_flag & (SENDZERO|OLD_SENDZERO))) { in _tx_sndv() 168 if (nbytes != 0) { in _tx_sndv() 169 if ((dataptr = malloc((size_t)nbytes)) == NULL) { in _tx_sndv() 189 bytes_remaining = nbytes; in _tx_sndv() 256 if (nbytes == bytes_remaining) { in _tx_sndv() 287 return (nbytes - bytes_remaining); in _tx_sndv()
|
H A D | t_sndvudata.c | 61 unsigned int nbytes; in _tx_sndvudata() local 86 nbytes = _t_bytecount_upto_intmax(tiov, tiovcount); in _tx_sndvudata() 88 if ((nbytes == 0) && in _tx_sndvudata() 95 if ((tiptr->ti_maxpsz > 0) && (nbytes > (uint32_t)tiptr->ti_maxpsz)) { in _tx_sndvudata() 161 if (nbytes != 0) { in _tx_sndvudata() 162 if ((dataptr = malloc((size_t)nbytes)) == NULL) { in _tx_sndvudata() 169 databuf.len = nbytes; in _tx_sndvudata() 170 databuf.maxlen = nbytes; in _tx_sndvudata()
|
/illumos-gate/usr/src/lib/libdwarf/common/ |
H A D | pro_section.h | 78 unsigned long nbytes); 81 #define GET_CHUNK_ERR(dbg,sectno,ptr,nbytes,error) \ argument 83 (ptr) = _dwarf_pro_buffer((dbg),(sectno),(nbytes)); \ 88 #define GET_CHUNK(dbg,sectno,ptr,nbytes,error) \ argument 90 (ptr) = _dwarf_pro_buffer((dbg),(sectno),(nbytes)); \
|
/illumos-gate/usr/src/lib/libmlrpc/common/ |
H A D | ndr_svc.c | 444 size_t nbytes; in ndr_uiomove() local 451 if ((nbytes = iov->iov_len) == 0) { in ndr_uiomove() 457 if (nbytes > buflen) in ndr_uiomove() 458 nbytes = buflen; in ndr_uiomove() 465 iov->iov_base += nbytes; in ndr_uiomove() 466 iov->iov_len -= nbytes; in ndr_uiomove() 467 uio->uio_resid -= nbytes; in ndr_uiomove() 468 uio->uio_offset += nbytes; in ndr_uiomove() 469 buf += nbytes; in ndr_uiomove() 470 buflen -= nbytes; in ndr_uiomove() [all …]
|
/illumos-gate/usr/src/cmd/bnu/ |
H A D | interface.c | 264 tread(fd, buf, nbytes) in tread() argument 267 unsigned nbytes; 279 twrite(fd, buf, nbytes) in twrite() argument 282 unsigned nbytes; 303 if (info.tsdu <= 0 || nbytes <= info.tsdu) 304 return (t_snd(fd, buf, nbytes, 0)); 309 while (nbytes >= info.tsdu) { 313 nbytes -= info.tsdu; 315 if (nbytes != 0) { 316 if ((ret = t_snd(fd, &buf[i], nbytes, 0)) != nbytes) [all …]
|
/illumos-gate/usr/src/lib/libipadm/common/ |
H A D | ipadm_ndpd.c | 317 ssize_t nbytes = 0; /* total bytes processed */ in ipadm_ndpd_read() local 321 while (nbytes < buflen) { in ipadm_ndpd_read() 339 prbytes = read(fd, (caddr_t)buffer + nbytes, buflen - nbytes); in ipadm_ndpd_read() 345 nbytes += prbytes; in ipadm_ndpd_read() 348 return (nbytes == buflen ? 0 : -1); in ipadm_ndpd_read() 359 ssize_t nbytes; in ipadm_ndpd_write() local 362 for (nwritten = 0; nwritten < buflen; nwritten += nbytes) { in ipadm_ndpd_write() 363 nbytes = write(fd, &buf[nwritten], buflen - nwritten); in ipadm_ndpd_write() 364 if (nbytes == -1) in ipadm_ndpd_write() 366 if (nbytes == 0) { in ipadm_ndpd_write()
|
/illumos-gate/usr/src/lib/libc/port/locale/ |
H A D | fputws.c | 62 int nbytes = 0; in _fputws_impl() local 64 while ((nbytes < (BUFSIZ - (MB_LEN_MAX * 2))) && nchars) { in _fputws_impl() 74 nbytes += n; in _fputws_impl() 78 if (fputs(buf, fp) < nbytes) { in _fputws_impl() 82 nwritten += nbytes; in _fputws_impl()
|
/illumos-gate/usr/src/cmd/sendmail/db/btree/ |
H A D | bt_put.c | 91 db_indx_t indx, nbytes; local 124 nbytes = BOVERFLOW_SIZE; 378 u_int32_t nbytes; local 392 nbytes = 473 int32_t nbytes; local 536 h->inp[indx] += nbytes; 544 h->inp[cnt] += nbytes; 548 HOFFSET(h) += nbytes; 549 t += nbytes; 720 u_int32_t indx, nbytes, flags; [all …]
|
/illumos-gate/usr/src/cmd/bhyve/test/tests/mevent/ |
H A D | read_requeue.c | 51 ssize_t nbytes; in munch() local 56 if ((nbytes = read(fd, buf, sizeof (buf))) < 0) { in munch() 57 ASSERT_INT64_EQ(("bad read: %s", strerror(errno)), nbytes, 1); in munch() 59 VERBOSE(("read %ld bytes '%s'", nbytes, buf)); in munch() 61 ASSERT_INT64_EQ(("wanted a byte of cookie"), nbytes, 1); in munch()
|