| /openbsd-src/usr.sbin/mkuboot/ |
| H A D | mkuboot.c | 286 ssize_t nbytes; in is_elf() local 289 nbytes = read(ifd, &ehdr, sizeof ehdr); in is_elf() 290 if (nbytes == -1) in is_elf() 295 if (nbytes != sizeof ehdr || !IS_ELF(ehdr)) in is_elf() 311 ssize_t nbytes, chunk; in copy_data() local 316 nbytes = read(ifd, buf, chunk); in copy_data() 317 if (nbytes != chunk) in copy_data() 319 if (write(ofd, buf, nbytes) != nbytes) in copy_data() 321 crc = crc32(crc, (Bytef *)buf, nbytes); in copy_data() 322 ih->ih_size += nbytes; in copy_data() [all …]
|
| /openbsd-src/usr.sbin/ldomctl/ |
| H A D | ldomctl.c | 431 ssize_t nbytes; in guest_start() local 461 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in guest_start() 462 if (nbytes != sizeof(msg)) in guest_start() 466 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in guest_start() 467 if (nbytes != sizeof(msg)) in guest_start() 478 ssize_t nbytes; in guest_stop() local 492 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in guest_stop() 493 if (nbytes != sizeof(msg)) in guest_stop() 497 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in guest_stop() 498 if (nbytes != sizeof(msg)) in guest_stop() [all …]
|
| /openbsd-src/lib/libc/db/btree/ |
| H A D | bt_split.c | 83 u_int32_t n, nbytes, nksize; in __bt_split() local 171 nbytes = NBINTERNAL(bi->ksize); in __bt_split() 175 nbytes = NBINTERNAL(bl->ksize); in __bt_split() 185 if (n < nbytes) { in __bt_split() 187 bt_pfxsaved += nbytes - n; in __bt_split() 189 nbytes = n; in __bt_split() 197 nbytes = NRINTERNAL; in __bt_split() 204 if (h->upper - h->lower < nbytes + sizeof(indx_t)) { in __bt_split() 207 bt_root(t, h, &l, &r, &skip, nbytes) : in __bt_split() 208 bt_page(t, h, &l, &r, &skip, nbytes); in __bt_split() [all …]
|
| /openbsd-src/gnu/usr.bin/perl/ |
| H A D | malloc.c | 748 # define POW2_OPTIMIZE_ADJUST(nbytes) \ 749 ((nbytes >= FIRST_BIG_BOUND) ? nbytes -= PERL_PAGESIZE : 0) 754 # define POW2_OPTIMIZE_ADJUST(nbytes) 758 #define BARK_64K_LIMIT(what,nbytes,size) argument 1100 fill_pat_4bytes(unsigned char *s, size_t nbytes, const unsigned char *fill) 1102 unsigned char *e = s + nbytes; 1141 cmp_pat_4bytes(unsigned char *s, size_t nbytes, const unsigned char *fill) 1143 unsigned char *e = s + nbytes; 1178 size_t nbytes; in S_adjust_size_and_find_bucket() 752 POW2_OPTIMIZE_ADJUST(nbytes) global() argument 762 BARK_64K_LIMIT(what,nbytes,size) global() argument 1104 fill_pat_4bytes(unsigned char * s,size_t nbytes,const unsigned char * fill) fill_pat_4bytes() argument 1145 cmp_pat_4bytes(unsigned char * s,size_t nbytes,const unsigned char * fill) cmp_pat_4bytes() argument 1182 size_t nbytes; S_adjust_size_and_find_bucket() local 1234 Perl_malloc(size_t nbytes) Perl_malloc() argument 1867 MEM_SIZE nbytes = ovp->ov_size + 1; Perl_mfree() local 1910 Perl_realloc(void * mp,size_t nbytes) Perl_realloc() argument [all...] |
| /openbsd-src/usr.sbin/ldomd/ |
| H A D | ds.c | 280 ssize_t nbytes; in ldc_send_vers() local 289 nbytes = write(lc->lc_fd, &lp, sizeof(lp)); in ldc_send_vers() 290 if (nbytes != sizeof(lp)) in ldc_send_vers() 300 ssize_t nbytes; in ldc_send_ack() local 309 nbytes = write(lc->lc_fd, &lp, sizeof(lp)); in ldc_send_ack() 310 if (nbytes != sizeof(lp)) in ldc_send_ack() 320 ssize_t nbytes; in ldc_send_nack() local 329 nbytes = write(lc->lc_fd, &lp, sizeof(lp)); in ldc_send_nack() 330 if (nbytes != sizeof(lp)) in ldc_send_nack() 340 ssize_t nbytes; in ldc_send_rts() local [all …]
|
| H A D | ldomd.c | 126 ssize_t nbytes; in main() local 167 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in main() 168 if (nbytes != sizeof(msg)) in main() 172 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in main() 173 if (nbytes != sizeof(msg)) in main() 388 size_t nbytes; in hv_update_md() local 417 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in hv_update_md() 418 if (nbytes != sizeof(msg)) in hv_update_md() 422 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in hv_update_md() 423 if (nbytes != sizeof(msg)) in hv_update_md() [all …]
|
| /openbsd-src/gnu/usr.bin/binutils/gdb/rdi-share/ |
| H A D | etherdrv.c | 388 int nbytes, fromlen = sizeof(from); in read_packet() local 394 if ((nbytes = recvfrom(sock, (char *)(packet->data), packet->buf_len, 0, in read_packet() 398 if (nbytes == SOCKET_ERROR && WSAGetLastError() != WSAEWOULDBLOCK) in read_packet() 413 if (pfnProgressCallback != NULL && nbytes != SOCKET_ERROR) in read_packet() 415 progressInfo.nRead += nbytes; in read_packet() 454 nbytes, (devchan == DC_DBUG) ? "DBUG" : "APPL"); in read_packet() 458 printf("[%d on %d]\n", nbytes, devchan); in read_packet() 463 while (i < nbytes) in read_packet() 480 packet->len = nbytes; in read_packet() 623 int nbytes; in EthernetWrite() local [all …]
|
| H A D | hsys.c | 215 unsigned int reason_code, mode, len, c, nbytes, nbtotal, nbtogo = 0; in HandleSysMessage() local 504 unpack_message(buffp, "%w%w%w", &fh, &nbtotal, &nbytes); in HandleSysMessage() 506 fh, nbtotal, nbytes)); in HandleSysMessage() 519 nbtogo -= nbytes; in HandleSysMessage() 528 memcpy(rwdata, buffp+12, nbytes); in HandleSysMessage() 529 rwdata += nbytes; in HandleSysMessage() 588 &DebugID, &OSInfo1, &OSInfo2, &nbytes); in HandleSysMessage() 597 DebugPrintF(("CL_WriteX: nbytes %u\n", nbytes)); in HandleSysMessage() 598 memcpy(rwdata, BUFFERDATA(buffhead)+20, nbytes); in HandleSysMessage() 599 rwdata += nbytes; in HandleSysMessage() [all …]
|
| /openbsd-src/gnu/usr.bin/binutils/gdb/ |
| H A D | dwarfread.c | 1184 int nbytes; in decode_array_element_type() local 1189 nbytes = attribute_size (attribute); in decode_array_element_type() 1190 if (nbytes == -1) in decode_array_element_type() 1200 fundtype = target_to_host (scan, nbytes, GET_UNSIGNED, in decode_array_element_type() 1208 die_ref = target_to_host (scan, nbytes, GET_UNSIGNED, in decode_array_element_type() 1284 int nbytes; in decode_subscript_data_item() local 1299 nbytes = TARGET_FT_LONG_SIZE (current_objfile); in decode_subscript_data_item() 1300 lowbound = target_to_host (scan, nbytes, GET_UNSIGNED, current_objfile); in decode_subscript_data_item() 1301 scan += nbytes; in decode_subscript_data_item() 1302 highbound = target_to_host (scan, nbytes, GET_UNSIGNED, current_objfile); in decode_subscript_data_item() [all …]
|
| /openbsd-src/sys/arch/sparc64/dev/ |
| H A D | vdsp.c | 723 psize_t nbytes; in vdsp_rx_vio_dring_data() local 743 nbytes = MIN(size, PAGE_SIZE - (off & PAGE_MASK)); in vdsp_rx_vio_dring_data() 746 nbytes, &nbytes); in vdsp_rx_vio_dring_data() 751 va += nbytes; in vdsp_rx_vio_dring_data() 752 size -= nbytes; in vdsp_rx_vio_dring_data() 753 off += nbytes; in vdsp_rx_vio_dring_data() 1137 psize_t nbytes; in vdsp_read_desc() local 1167 nbytes = MIN(size, dm->cookie[i].size - off); in vdsp_read_desc() 1168 nbytes = MIN(nbytes, PAGE_SIZE - (off & PAGE_MASK)); in vdsp_read_desc() 1170 dm->cookie[i].addr + off, pa, nbytes, &nbytes); in vdsp_read_desc() [all …]
|
| /openbsd-src/sys/dev/isa/ |
| H A D | isadma.c | 265 isa_dmastart(struct device *isadev, int chan, void *addr, bus_size_t nbytes, in isa_dmastart() argument 288 chan, addr, nbytes, p, flags, busdmaflags); in isa_dmastart() 292 if (nbytes > (1 << 17) || nbytes & 1 || (u_long)addr & 1) { in isa_dmastart() 294 sc->sc_dev.dv_xname, chan, nbytes, addr); in isa_dmastart() 298 if (nbytes > (1 << 16)) { in isa_dmastart() 300 sc->sc_dev.dv_xname, chan, nbytes); in isa_dmastart() 315 error = bus_dmamap_load(sc->sc_dmat, dmam, addr, nbytes, p, in isa_dmastart() 342 sc->sc_dmalength[chan] = nbytes; in isa_dmastart() 363 (--nbytes) & 0xff); in isa_dmastart() 365 (nbytes >> 8) & 0xff); in isa_dmastart() [all …]
|
| /openbsd-src/gnu/usr.sbin/mkhybrid/src/libfile/ |
| H A D | softmagic.c | 58 softmagic(buf, nbytes) in softmagic() argument 60 int nbytes; 62 return (match(buf, nbytes)); 93 match(s, nbytes) in match() argument 95 int nbytes; 102 if (!mget(&p, s, &magic[magindex], nbytes) || 167 mget(p, s, m, nbytes) in mget() argument 171 int nbytes; 175 if (offset + sizeof(union VALUETYPE) <= nbytes) 182 int32 have = nbytes - offset; [all …]
|
| H A D | lfile.c | 182 int nbytes = 0; /* number of bytes read from a datafile */ local 198 if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) 201 if (nbytes == 0) 204 buf[nbytes++] = '\0'; /* null-terminate it */ 205 match = softmagic(buf, nbytes);
|
| /openbsd-src/gnu/usr.bin/binutils/opcodes/ |
| H A D | cris-dis.c | 699 int nbytes; local 702 nbytes = 4; 713 nbytes = 42; 716 nbytes = (sregp->reg_size + 1) & ~1; 723 nbytes = 2; 725 nbytes = mode_size; 728 switch (nbytes) 756 && (nbytes <= 2 || buffer[1 + nbytes] == 0))) 767 if (nbytes == 4 934 unsigned int nbytes; local [all …]
|
| /openbsd-src/usr.bin/hexdump/ |
| H A D | odsyntax.c | 203 int x, y, nbytes; in posixtypes() local 248 nbytes = sizeof(char); in posixtypes() 251 nbytes = sizeof(short); in posixtypes() 254 nbytes = sizeof(int); in posixtypes() 257 nbytes = sizeof(long); in posixtypes() 266 nbytes = strtol(type_string, &type_string, 10); in posixtypes() 268 nbytes = 4; in posixtypes() 270 switch (nbytes) { in posixtypes() 285 "supported", nbytes); in posixtypes()
|
| /openbsd-src/gnu/usr.bin/binutils/gdb/testsuite/gdb.base/ |
| H A D | interrupt.c | 9 int nbytes; in main() local 17 nbytes = read (0, &x, 1); in main() 18 if (nbytes < 0) in main() 25 else if (nbytes == 0) in main()
|
| /openbsd-src/gnu/gcc/gcc/config/ |
| H A D | host-hpux.c | 123 ssize_t nbytes; in hpux_gt_pch_use_address() local 125 nbytes = read (fd, base, MIN (size, SSIZE_MAX)); in hpux_gt_pch_use_address() 126 if (nbytes <= 0) in hpux_gt_pch_use_address() 128 base = (char *) base + nbytes; in hpux_gt_pch_use_address() 129 size -= nbytes; in hpux_gt_pch_use_address()
|
| H A D | host-linux.c | 206 ssize_t nbytes; in linux_gt_pch_use_address() local 208 nbytes = read (fd, base, MIN (size, SSIZE_MAX)); in linux_gt_pch_use_address() 209 if (nbytes <= 0) in linux_gt_pch_use_address() 211 base = (char *) base + nbytes; in linux_gt_pch_use_address() 212 size -= nbytes; in linux_gt_pch_use_address()
|
| /openbsd-src/gnu/usr.bin/binutils-2.17/opcodes/ |
| H A D | cris-dis.c | 893 int nbytes; in print_with_operands() local 896 nbytes = 4; in print_with_operands() 907 nbytes = 42; in print_with_operands() 912 nbytes = disdata->distype == cris_dis_v32 in print_with_operands() 920 nbytes = 2; in print_with_operands() 922 nbytes = mode_size; in print_with_operands() 925 switch (nbytes) in print_with_operands() 953 && (nbytes <= 2 || buffer[1 + nbytes] == 0))) in print_with_operands() 964 if (nbytes == 4 in print_with_operands() 1132 unsigned int nbytes; in print_with_operands() local [all …]
|
| /openbsd-src/lib/libc/db/recno/ |
| H A D | rec_delete.c | 147 u_int32_t nbytes; in __rec_dleaf() local 164 nbytes = NRLEAF(rl); in __rec_dleaf() 171 memmove(from + nbytes, from, (char *)to - from); in __rec_dleaf() 172 h->upper += nbytes; in __rec_dleaf() 177 ip[0] += nbytes; in __rec_dleaf() 179 ip[0] = ip[1] < offset ? ip[1] + nbytes : ip[1]; in __rec_dleaf()
|
| /openbsd-src/gnu/llvm/libcxx/src/support/solaris/ |
| H A D | wcsnrtombs.inc | 35 size_t nbytes; 39 nbytes = 0; 47 return (nbytes + nb - 1); 49 nbytes += nb; 51 return (nbytes); 83 return (nbytes + nb - 1); 88 nbytes += nb; 91 return (nbytes);
|
| /openbsd-src/gnu/usr.bin/binutils/gas/ |
| H A D | read.c | 3203 parse_mri_cons (expressionS *exp, unsigned int nbytes); 3210 parse_bitfield_cons (expressionS *exp, unsigned int nbytes); 3215 parse_repeat_cons (expressionS *exp, unsigned int nbytes); 3226 int nbytes ATTRIBUTE_UNUSED) in do_parse_cons_expression() 3228 TC_PARSE_CONS_EXPRESSION (exp, nbytes); in do_parse_cons_expression() 3236 cons_worker (register int nbytes, /* 1=.byte, 2=.word, 4=.long. */ in cons_worker() argument 3260 md_cons_align (nbytes); in cons_worker() 3268 parse_mri_cons (&exp, (unsigned int) nbytes); in cons_worker() 3271 TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes); in cons_worker() 3280 emit_expr (&exp, (unsigned int) nbytes); in cons_worker() [all …]
|
| /openbsd-src/regress/sys/kern/poll/ |
| H A D | poll_iocond.c | 314 size_t nbytes; in proc_child() local 349 nbytes = 0; in proc_child() 360 nbytes += ret; in proc_child() 362 ret = write(bfd, &nbytes, sizeof(nbytes)); in proc_child() 363 assert(ret == sizeof(nbytes)); in proc_child() 494 size_t nbytes; in proc_parent() local 564 nbytes = 0; in proc_parent() 565 ret = read(bfd, &nbytes, sizeof(nbytes)); in proc_parent() 566 assert(ret == sizeof(nbytes)); in proc_parent() 579 if (nbytes > 0 && retries > 0) in proc_parent() [all …]
|
| /openbsd-src/gnu/usr.bin/binutils-2.17/gas/ |
| H A D | read.c | 3478 parse_mri_cons (expressionS *exp, unsigned int nbytes); 3485 parse_bitfield_cons (expressionS *exp, unsigned int nbytes); 3490 parse_repeat_cons (expressionS *exp, unsigned int nbytes); 3501 int nbytes ATTRIBUTE_UNUSED) in do_parse_cons_expression() 3503 TC_PARSE_CONS_EXPRESSION (exp, nbytes); in do_parse_cons_expression() 3511 cons_worker (register int nbytes, /* 1=.byte, 2=.word, 4=.long. */ in cons_worker() argument 3535 if (nbytes == 0) in cons_worker() 3536 nbytes = TC_ADDRESS_BYTES (); in cons_worker() 3540 md_cons_align (nbytes); in cons_worker() 3548 parse_mri_cons (&exp, (unsigned int) nbytes); in cons_worker() [all …]
|
| /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/ |
| H A D | asmreg-1.c | 48 __getdents64 (int fd, char *buf, unsigned nbytes) in __getdents64() argument 55 skdp = kdp = __builtin_alloca (nbytes); in __getdents64() 56 retval = __syscall_getdents64(fd, (char *)kdp, nbytes); in __getdents64() 61 if ((char *) dp > buf + nbytes) in __getdents64()
|