/openbsd/bin/ksh/ |
H A D | expand.h | 10 XString xs; 39 (xs).beg = alloc((xs).len + X_EXTRA, (xs).areap); \ 40 (xs).end = (xs).beg + (xs).len; \ 55 #define Xcheck(xs, xp) XcheckN(xs, xp, 1) argument 58 #define Xfree(xs, xp) afree((xs).beg, (xs).areap) argument 61 #define Xclose(xs, xp) aresize((xs).beg, ((xp) - (xs).beg), (xs).areap) argument 63 #define Xstring(xs, xp) ((xs).beg) argument 66 #define Xlength(xs, xp) ((xp) - (xs).beg) argument 67 #define Xsize(xs, xp) ((xs).end - (xs).beg) argument 68 #define Xsavepos(xs, xp) ((xp) - (xs).beg) argument [all …]
|
/openbsd/sys/dev/usb/ |
H A D | umass_scsi.c | 191 sc_link->target, sc_link->lun, xs, xs->cmd.opcode, in umass_scsi_cmd() 192 xs->datalen, sc_link->quirks, xs->flags & SCSI_POLL)); in umass_scsi_cmd() 235 xs->data, xs->datalen, dir, in umass_scsi_cmd() 236 xs->timeout, umass_scsi_cb, xs); in umass_scsi_cmd() 249 xs->data, xs->datalen, dir, in umass_scsi_cmd() 250 xs->timeout, umass_scsi_cb, xs); in umass_scsi_cmd() 257 scsi_done(xs); in umass_scsi_cmd() 334 &xs->sense, sizeof(xs->sense), in umass_scsi_cb() 355 xs->error, xs->status, xs->resid)); in umass_scsi_cb() 404 "xs->flags=0x%x xs->resid=%zu\n", xs->error, xs->status, in umass_scsi_sense_cb() [all …]
|
/openbsd/sys/dev/ata/ |
H A D | atascsi.c | 770 bcopy(&pg, xs->data, MIN(sizeof(pg), xs->datalen)); in atascsi_disk_vpd_serial() 821 bcopy(&pg, xs->data, MIN(pg_len, xs->datalen)); in atascsi_disk_vpd_ident() 863 bcopy(&pg, xs->data, MIN(sizeof(pg), xs->datalen)); in atascsi_disk_vpd_ata() 894 bcopy(&pg, xs->data, MIN(sizeof(pg), xs->datalen)); in atascsi_disk_vpd_limits() 915 bcopy(&pg, xs->data, MIN(sizeof(pg), xs->datalen)); in atascsi_disk_vpd_info() 940 bcopy(&pg, xs->data, MIN(sizeof(pg), xs->datalen)); in atascsi_disk_vpd_thin() 1311 bcopy(&rcd, xs->data, MIN(sizeof(rcd), xs->datalen)); in atascsi_disk_capacity() 1349 bcopy(&rcd, xs->data, MIN(sizeof(rcd), xs->datalen)); in atascsi_disk_capacity16() 1503 bzero(xs->data, xs->datalen); in atascsi_disk_sense() 1643 memcpy(xa->packetcmd, &xs->cmd, xs->cmdlen); in atascsi_atapi_cmd() [all …]
|
/openbsd/sys/scsi/ |
H A D | scsi_base.c | 776 return xs; in scsi_xs_io() 866 received = xs->datalen - xs->resid; in scsi_inquire() 1446 xs->resid = xs->datalen; in scsi_xs_exec() 1456 xs->sc_link->bus->sb_adapter->scsi_cmd(xs); in scsi_xs_exec() 1476 xs->resid = xs->datalen - copy_cnt; in scsi_copy_internal_data() 1488 if (xs->datalen && ISSET(xs->flags, SCSI_DATA_IN)) in scsi_done() 1489 scsi_show_mem(xs->data, min(64, xs->datalen)); in scsi_done() 1495 xs->done(xs); in scsi_done() 1573 error = xs->sc_link->interpret_sense(xs); in scsi_xs_error() 1658 if (xs->resid == xs->datalen) in scsi_interpret_sense() [all …]
|
H A D | scsi_ioctl.c | 110 if (xs == NULL) in scsi_ioc_cmd() 141 scsi_xs_sync(xs); in scsi_ioc_cmd() 145 switch (xs->error) { in scsi_ioc_cmd() 148 screq->datalen_used = xs->datalen - xs->resid; in scsi_ioc_cmd() 152 SC_DEBUG_SENSE(xs); in scsi_ioc_cmd() 187 if (xs->data) in scsi_ioc_cmd() 189 scsi_xs_put(xs); in scsi_ioc_cmd() 205 if (xs == NULL) in scsi_ioc_ata_cmd() 259 scsi_xs_sync(xs); in scsi_ioc_ata_cmd() 282 if (xs->data) in scsi_ioc_ata_cmd() [all …]
|
H A D | cd.c | 579 xs->cookie = bp; in cdstart() 580 xs->bp = bp; in cdstart() 590 xs->cmdlen = cd_cmd_rw6(&xs->cmd, read, secno, nsecs); in cdstart() 593 xs->cmdlen = cd_cmd_rw10(&xs->cmd, read, secno, nsecs); in cdstart() 595 xs->cmdlen = cd_cmd_rw12(&xs->cmd, read, secno, nsecs); in cdstart() 1282 if (xs == NULL) in cd_load_unload() 1347 if (xs == NULL) in cd_play() 1434 if (xs == NULL) in cd_play_msf() 1465 if (xs == NULL) in cd_pause() 1490 if (xs == NULL) in cd_reset() [all …]
|
H A D | mpath.c | 136 scsi_done(xs); in mpath_xs_stuffup() 204 memcpy(&mxs->cmd, &xs->cmd, xs->cmdlen); in mpath_cmd() 218 memcpy(&xs->sense, &mxs->sense, sizeof(xs->sense)); in mpath_cmd() 221 scsi_done(xs); in mpath_cmd() 246 if (xs != NULL) { in mpath_start() 253 if (xs == NULL) in mpath_start() 256 memcpy(&mxs->cmd, &xs->cmd, xs->cmdlen); in mpath_start() 262 mxs->bp = xs->bp; in mpath_start() 265 mxs->cookie = xs; in mpath_start() 326 memcpy(&xs->sense, &mxs->sense, sizeof(xs->sense)); in mpath_done() [all …]
|
H A D | st.c | 944 xs->bp = bp; in ststart() 1273 if (xs == NULL) in st_read() 1276 xs->data = buf; in st_read() 1534 if (xs == NULL) in st_erase() 1639 if (xs == NULL) in st_space() 1708 if (xs == NULL) in st_write_filemarks() 1811 if (xs == NULL) in st_load() 1842 if (xs == NULL) in st_rewind() 1958 xs->resid = xs->datalen; in st_interpret_sense() 1982 xs->resid = 0; in st_interpret_sense() [all …]
|
H A D | mpath_hds.c | 232 xs->done = hds_status_done; in hds_status() 234 scsi_xs_exec(xs); in hds_status() 252 scsi_xs_put(xs); in hds_status_done() 260 struct scsi_xfer *xs; in hds_inquiry() local 269 if (xs == NULL) in hds_inquiry() 274 error = scsi_xs_sync(xs); in hds_inquiry() 275 scsi_xs_put(xs); in hds_inquiry() 295 struct scsi_xfer *xs; in hds_info() local 302 if (xs == NULL) in hds_info() 307 error = scsi_xs_sync(xs); in hds_info() [all …]
|
H A D | ch.c | 363 if (xs == NULL) in ch_move() 367 xs->timeout = 100000; in ch_move() 378 scsi_xs_put(xs); in ch_move() 422 if (xs == NULL) in ch_exchange() 440 scsi_xs_put(xs); in ch_exchange() 470 if (xs == NULL) in ch_position() 484 scsi_xs_put(xs); in ch_position() 677 if (xs == NULL) in ch_getelemstatus() 680 xs->data = data; in ch_getelemstatus() 694 scsi_xs_put(xs); in ch_getelemstatus() [all …]
|
/openbsd/sys/dev/pv/ |
H A D | xenstore.c | 208 sc->sc_xs = xs; in xs_attach() 209 xs->xs_sc = sc; in xs_attach() 239 if (xen_intr_establish(xs->xs_port, &xs->xs_ih, 0, xs_intr, xs, in xs_attach() 250 TAILQ_INSERT_TAIL(&xs->xs_free, &xs->xs_msgs[i], xsm_link); in xs_attach() 277 free(xs, sizeof(*xs), M_DEVBUF); in xs_attach() 345 xs_intr(xs); in xs_poll() 348 tsleep_nsec(xs->xs_wchan, PRIBIO, xs->xs_wchan, in xs_poll() 378 while (xs->xs_ring->xsr_req_prod != xs->xs_ring->xsr_req_cons) in xs_output() 379 xs_poll(xs, 1); in xs_output() 444 xs_intr(xs); in xs_reply() [all …]
|
H A D | vioscsi.c | 196 vr->vr_xs = xs; in vioscsi_scsi_cmd() 203 if (xs->sc_link->target >= 256 || xs->sc_link->lun >= 16384) in vioscsi_scsi_cmd() 214 memcpy(req->cdb, &xs->cmd, xs->cmdlen); in vioscsi_scsi_cmd() 221 xs->data, xs->datalen, NULL, in vioscsi_scsi_cmd() 277 xs->resid = xs->datalen; in vioscsi_scsi_cmd() 279 scsi_done(xs); in vioscsi_scsi_cmd() 288 xs->resid = xs->datalen; in vioscsi_scsi_cmd() 290 scsi_done(xs); in vioscsi_scsi_cmd() 317 xs->resid = xs->datalen; in vioscsi_req_done() 330 xs->error, xs->status, xs->resid); in vioscsi_req_done() [all …]
|
H A D | vioblk.c | 360 xs->resid = xs->datalen; in vioblk_vq_done1() 363 xs->resid = xs->datalen - vr->vr_len; in vioblk_vq_done1() 366 scsi_done(xs); in vioblk_vq_done1() 389 xs->resid = xs->datalen; in vioblk_reset() 390 scsi_done(xs); in vioblk_reset() 483 vr = xs->io; in vioblk_scsi_cmd() 509 vr->vr_xs = xs; in vioblk_scsi_cmd() 606 bcopy(&rcd, xs->data, MIN(sizeof(rcd), xs->datalen)); in vioblk_scsi_capacity() 621 bcopy(&rcd, xs->data, MIN(sizeof(rcd), xs->datalen)); in vioblk_scsi_capacity16() 628 xs->error = error; in vioblk_scsi_done() [all …]
|
H A D | xbf.c | 406 xbf_scsi_inq(xs); in xbf_scsi_cmd() 434 if (ISSET(xs->flags, SCSI_POLL) && xbf_poll_cmd(xs)) { in xbf_scsi_cmd() 436 xs->cmd.opcode); in xbf_scsi_cmd() 468 error = bus_dmamap_load(sc->sc_dmat, map, xs->data, xs->datalen, in xbf_load_cmd() 550 memcpy(dma->dma_vaddr, xs->data, xs->datalen); in xbf_bounce_cmd() 596 memcpy(xs->data, (caddr_t)dma->dma_vaddr, xs->datalen); in xbf_reclaim_cmd() 705 ccb->ccb_xfer = xs; in xbf_submit_cmd() 868 bcopy(&rcd, xs->data, MIN(sizeof(rcd), xs->datalen)); in xbf_scsi_capacity() 887 bcopy(&rcd, xs->data, MIN(sizeof(rcd), xs->datalen)); in xbf_scsi_capacity16() 897 xs->error = error; in xbf_scsi_done() [all …]
|
/openbsd/sys/dev/ic/ |
H A D | aic79xx_openbsd.c | 152 struct scsi_xfer *xs = scb->xs; in ahd_done() local 237 memset(&xs->sense, 0, sizeof(xs->sense)); in ahd_done() 243 scsi_done(xs); in ahd_done() 270 scsi_done(xs); in ahd_action() 283 scb = xs->io; in ahd_action() 293 scb->xs = xs; in ahd_action() 326 xs = scb->xs; in ahd_execute_scb() 328 xs->status = 0; in ahd_execute_scb() 400 timeout_add_msec(&xs->stimeout, xs->timeout); in ahd_execute_scb() 479 xs->resid = xs->status = 0; in ahd_setup_data() [all …]
|
H A D | aic7xxx_openbsd.c | 148 struct scsi_xfer *xs = scb->xs; in ahc_done() local 168 if (xs->datalen) { in ahc_done() 242 scsi_done(xs); in ahc_done() 265 scb = xs->io; in ahc_action() 277 scb->xs = xs; in ahc_action() 310 xs = scb->xs; in ahc_execute_scb() 312 xs->status = 0; in ahc_execute_scb() 401 timeout_add_msec(&xs->stimeout, xs->timeout); in ahc_execute_scb() 505 xs->resid = xs->status = 0; in ahc_setup_data() 511 scsi_done(xs); in ahc_setup_data() [all …]
|
H A D | uha.c | 193 struct scsi_xfer *xs = mscp->xs; in uha_done() local 235 xs->resid = 0; in uha_done() 238 scsi_done(xs); in uha_done() 265 flags = xs->flags; in uha_scsi_cmd() 266 mscp = xs->io; in uha_scsi_cmd() 268 mscp->xs = xs; in uha_scsi_cmd() 270 timeout_set(&xs->stimeout, uha_timeout, xs); in uha_scsi_cmd() 295 if (xs->datalen) { in uha_scsi_cmd() 303 printf("%s: %d @%p- ", sc->sc_dev.dv_xname, xs->datalen, xs->data); in uha_scsi_cmd() 398 scsi_done(xs); in uha_scsi_cmd() [all …]
|
H A D | adv.c | 256 xs = ccb->xs; in adv_start_ccbs() 520 ccb = xs->io; in adv_scsi_cmd() 522 ccb->xs = xs; in adv_scsi_cmd() 563 ccb->dmamap_xfer, xs->data, xs->datalen, NULL, in adv_scsi_cmd() 578 scsi_done(xs); in adv_scsi_cmd() 685 struct scsi_xfer *xs = ccb->xs; in adv_timeout() local 725 struct scsi_xfer *xs = ccb->xs; in adv_watchdog() local 754 struct scsi_xfer *xs = ccb->xs; in adv_narrow_isr_callback() local 762 xs->sc_link->lun, xs->cmd.opcode); in adv_narrow_isr_callback() 792 xs->resid = 0; in adv_narrow_isr_callback() [all …]
|
H A D | adw.c | 537 ccb = xs->io; in adw_scsi_cmd() 539 ccb->xs = xs; in adw_scsi_cmd() 542 if (adw_build_req(xs, ccb, xs->flags)) { in adw_scsi_cmd() 554 scsi_done(xs); in adw_scsi_cmd() 571 scsi_done(xs); in adw_scsi_cmd() 621 if (xs->datalen) { in adw_build_req() 626 ccb->dmamap_xfer, xs->data, xs->datalen, NULL, in adw_build_req() 766 struct scsi_xfer *xs = ccb->xs; in adw_timeout() local 963 xs = ccb->xs; in adw_isr_callback() 971 if (xs->datalen) { in adw_isr_callback() [all …]
|
H A D | gdt_common.c | 528 if (xs != NULL) in gdt_dequeue() 531 return (xs); in gdt_dequeue() 566 scsi_done(xs); in gdt_scsi_cmd() 603 scsi_done(xs); in gdt_scsi_cmd() 610 scsi_done(xs); in gdt_scsi_cmd() 618 scsi_done(xs); in gdt_scsi_cmd() 665 ccb = xs->io; in gdt_scsi_cmd() 677 xs->data, xs->datalen, NULL, in gdt_scsi_cmd() 849 xs->resid = 0; in gdt_exec_ccb() 1036 if (xs && xs->cmd.opcode != PREVENT_ALLOW && in gdt_intr() [all …]
|
/openbsd/gnu/usr.bin/perl/cpan/ExtUtils-Constant/lib/ExtUtils/ |
H A D | Constant.pm | 187 my $xs = <<"EOT"; 213 $xs .= 217 $xs .= << 'EOT'; 223 $xs .= << 'EOT'; 228 $xs .= << 'EOT'; 233 $xs .= << "EOT"; 244 $xs .= ");\n"; 250 $xs .= << "EOT"; 286 $xs .= " */\n"; 289 $xs .= << "EOT"; [all …]
|
/openbsd/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/cpp/ |
H A D | vararg2.c | 35 #define _gnu_keep(xs...) xs argument 37 #define _gnu_split_r(n,xs...) _gnu_split_rd (n,_gnu_keep,_gnu_discard xs) argument 38 #define _gnu_split_d(n,xs...) _gnu_split_rd (n,_gnu_discard,_gnu_keep xs) argument 39 #define _gnu_split_rd(n,xs...) _gnu_split_##n (xs) argument 40 #define _gnu_split_0(a,b,xs...) a() b(xs) argument 41 #define _gnu_split_1(a,b,x0,xs...) a(x0) b(xs) argument 42 #define _gnu_split_2(a,b,x0,x1,xs...) a(x0,x1) b(xs) argument 43 #define _gnu_split_3(a,b,x0,x1,x2,xs...) a(x0,x1,x2) b(xs) argument 44 #define _gnu_split_4(a,b,x0,x1,x2,x3,xs...) a(x0,x1,x2,x3) b(xs) argument 45 #define _gnu_split_5(a,b,x0,x1,x2,x3,x4,xs...) a(x0,x1,x2,x3,x4) b(xs) argument [all …]
|
/openbsd/sys/dev/sdmmc/ |
H A D | sdmmc_scsi.c | 321 scsi_done(xs); in sdmmc_scsi_cmd() 346 scsi_done(xs); in sdmmc_scsi_cmd() 353 bcopy(&rcd, xs->data, MIN(xs->datalen, sizeof rcd)); in sdmmc_scsi_cmd() 354 scsi_done(xs); in sdmmc_scsi_cmd() 361 scsi_done(xs); in sdmmc_scsi_cmd() 373 scsi_done(xs); in sdmmc_scsi_cmd() 377 ccb = xs->io; in sdmmc_scsi_cmd() 457 scsi_done(xs); in sdmmc_inquiry() 480 timeout_add_msec(&xs->stimeout, xs->timeout); in sdmmc_start_xs() 531 xs->resid = 0; in sdmmc_done_xs() [all …]
|
/openbsd/sys/dev/isa/ |
H A D | wds.c | 617 struct scsi_xfer *xs = scb->xs; in wds_done() local 622 if (xs == 0) { in wds_done() 692 bcopy(scb->buf->data, xs->data, xs->datalen); in wds_done() 696 scsi_done(xs); in wds_done() 890 scb = xs->io; in wds_scsi_cmd() 891 scb->xs = xs; in wds_scsi_cmd() 896 bcopy(&xs->cmd, &scb->cmd.scb, xs->cmdlen < 12 ? xs->cmdlen : 12); in wds_scsi_cmd() 993 bcopy(xs->data, scb->buf->data, xs->datalen); in wds_scsi_cmd() 1044 struct scsi_xfer *xs = scb->xs; in wds_sense() local 1057 bcopy(scb->buf->data, xs->data, xs->datalen); in wds_sense() [all …]
|
/openbsd/sys/dev/ |
H A D | vscsi.c | 180 scsi_done(xs); in vscsi_cmd() 184 ccb->ccb_xs = xs; in vscsi_cmd() 196 scsi_done(xs); in vscsi_cmd() 206 scsi_done(xs); in vscsi_cmd() 221 scsi_done(xs); in vscsi_done() 353 xs = ccb->ccb_xs; in vscsi_i2t() 359 memcpy(&i2t->cmd, &xs->cmd, xs->cmdlen); in vscsi_i2t() 396 xs = ccb->ccb_xs; in vscsi_data() 415 buf = xs->data; in vscsi_data() 447 xs->resid = xs->datalen - ccb->ccb_datalen; in vscsi_t2i() [all …]
|