| /trueos/sys/geom/ |
| HD | geom_ctl.c | 91 gctl_error(struct gctl_req *req, const char *fmt, ...) in gctl_error() argument 95 if (req == NULL) in gctl_error() 99 if (sbuf_done(req->serror)) { in gctl_error() 100 if (!req->nerror) in gctl_error() 101 req->nerror = EEXIST; in gctl_error() 102 return (req->nerror); in gctl_error() 104 if (!req->nerror) in gctl_error() 105 req->nerror = EINVAL; in gctl_error() 108 sbuf_vprintf(req->serror, fmt, ap); in gctl_error() 110 sbuf_finish(req->serror); in gctl_error() [all …]
|
| /trueos/lib/libgeom/ |
| HD | geom_ctl.c | 55 gctl_dump(struct gctl_req *req, FILE *f) in gctl_dump() argument 61 if (req == NULL) { in gctl_dump() 65 fprintf(f, "Dump of gctl request at %p:\n", req); in gctl_dump() 66 if (req->error != NULL) in gctl_dump() 67 fprintf(f, " error:\t\"%s\"\n", req->error); in gctl_dump() 70 for (i = 0; i < req->narg; i++) { in gctl_dump() 71 ap = &req->arg[i]; in gctl_dump() 96 gctl_set_error(struct gctl_req *req, const char *error, ...) in gctl_set_error() argument 100 if (req->error != NULL) in gctl_set_error() 103 vasprintf(&req->error, error, ap); in gctl_set_error() [all …]
|
| /trueos/sbin/geom/class/eli/ |
| HD | geom_eli.c | 64 static void eli_main(struct gctl_req *req, unsigned flags); 65 static void eli_init(struct gctl_req *req); 66 static void eli_attach(struct gctl_req *req); 67 static void eli_configure(struct gctl_req *req); 68 static void eli_setkey(struct gctl_req *req); 69 static void eli_delkey(struct gctl_req *req); 70 static void eli_resume(struct gctl_req *req); 71 static void eli_kill(struct gctl_req *req); 72 static void eli_backup(struct gctl_req *req); 73 static void eli_restore(struct gctl_req *req); [all …]
|
| /trueos/sys/dev/sfxge/common/ |
| HD | siena_nic.c | 40 efx_mcdi_req_t req; in siena_nic_get_partn_mask() local 44 req.emr_cmd = MC_CMD_NVRAM_TYPES; in siena_nic_get_partn_mask() 46 req.emr_in_buf = NULL; in siena_nic_get_partn_mask() 47 req.emr_in_length = 0; in siena_nic_get_partn_mask() 48 req.emr_out_buf = outbuf; in siena_nic_get_partn_mask() 49 req.emr_out_length = sizeof (outbuf); in siena_nic_get_partn_mask() 51 efx_mcdi_execute(enp, &req); in siena_nic_get_partn_mask() 53 if (req.emr_rc != 0) { in siena_nic_get_partn_mask() 54 rc = req.emr_rc; in siena_nic_get_partn_mask() 58 if (req.emr_out_length_used < MC_CMD_NVRAM_TYPES_OUT_LEN) { in siena_nic_get_partn_mask() [all …]
|
| HD | efx_wol.c | 69 efx_mcdi_req_t req; in efx_wol_filter_clear() local 76 req.emr_cmd = MC_CMD_WOL_FILTER_RESET; in efx_wol_filter_clear() 77 req.emr_in_buf = payload; in efx_wol_filter_clear() 78 req.emr_in_length = MC_CMD_WOL_FILTER_RESET_IN_LEN; in efx_wol_filter_clear() 79 req.emr_out_buf = NULL; in efx_wol_filter_clear() 80 req.emr_out_length = 0; in efx_wol_filter_clear() 82 MCDI_IN_SET_DWORD(req, WOL_FILTER_RESET_IN_MASK, in efx_wol_filter_clear() 86 efx_mcdi_execute(enp, &req); in efx_wol_filter_clear() 88 if (req.emr_rc != 0) { in efx_wol_filter_clear() 89 rc = req.emr_rc; in efx_wol_filter_clear() [all …]
|
| /trueos/sys/dev/io/ |
| HD | iodev.c | 51 static int iopio_read(struct iodev_pio_req *req); 52 static int iopio_write(struct iodev_pio_req *req); 122 iopio_read(struct iodev_pio_req *req) in iopio_read() argument 125 switch (req->width) { in iopio_read() 127 req->val = iodev_read_1(req->port); in iopio_read() 130 if (req->port & 1) { in iopio_read() 131 req->val = iodev_read_1(req->port); in iopio_read() 132 req->val |= iodev_read_1(req->port + 1) << 8; in iopio_read() 134 req->val = iodev_read_2(req->port); in iopio_read() 137 if (req->port & 1) { in iopio_read() [all …]
|
| /trueos/usr.sbin/ctld/ |
| HD | isns.c | 56 struct isns_req *req; in isns_req_alloc() local 58 req = calloc(sizeof(struct isns_req), 1); in isns_req_alloc() 59 if (req == NULL) { in isns_req_alloc() 63 req->ir_buflen = sizeof(struct isns_hdr); in isns_req_alloc() 64 req->ir_usedlen = 0; in isns_req_alloc() 65 req->ir_buf = calloc(req->ir_buflen, 1); in isns_req_alloc() 66 if (req->ir_buf == NULL) { in isns_req_alloc() 67 free(req); in isns_req_alloc() 71 return (req); in isns_req_alloc() 77 struct isns_req *req; in isns_req_create() local [all …]
|
| HD | kernel.c | 630 struct ctl_lun_req req; in kernel_lun_add() local 633 bzero(&req, sizeof(req)); in kernel_lun_add() 635 strlcpy(req.backend, lun->l_backend, sizeof(req.backend)); in kernel_lun_add() 636 req.reqtype = CTL_LUNREQ_CREATE; in kernel_lun_add() 638 req.reqdata.create.blocksize_bytes = lun->l_blocksize; in kernel_lun_add() 641 req.reqdata.create.lun_size_bytes = lun->l_size; in kernel_lun_add() 643 req.reqdata.create.flags |= CTL_LUN_FLAG_DEV_TYPE; in kernel_lun_add() 644 req.reqdata.create.device_type = T_DIRECT; in kernel_lun_add() 647 strncpy(req.reqdata.create.serial_num, lun->l_serial, in kernel_lun_add() 648 sizeof(req.reqdata.create.serial_num)); in kernel_lun_add() [all …]
|
| /trueos/sys/dev/usb/ |
| HD | usb_request.c | 137 usbd_get_debug_bits(struct usb_device *udev, struct usb_device_request *req, in usbd_get_debug_bits() argument 174 if ((temp != req->bmRequestType) && (temp >= 0) && (temp <= 255)) in usbd_get_debug_bits() 179 if ((temp != req->bRequest) && (temp >= 0) && (temp <= 255)) in usbd_get_debug_bits() 226 struct usb_device_request req; in usb_do_clear_stall_callback() local 278 req.bmRequestType = UT_WRITE_ENDPOINT; in usb_do_clear_stall_callback() 279 req.bRequest = UR_CLEAR_FEATURE; in usb_do_clear_stall_callback() 280 USETW(req.wValue, UF_ENDPOINT_HALT); in usb_do_clear_stall_callback() 281 req.wIndex[0] = ep->edesc->bEndpointAddress; in usb_do_clear_stall_callback() 282 req.wIndex[1] = 0; in usb_do_clear_stall_callback() 283 USETW(req.wLength, 0); in usb_do_clear_stall_callback() [all …]
|
| /trueos/sys/geom/mirror/ |
| HD | g_mirror_ctl.c | 94 g_mirror_ctl_configure(struct gctl_req *req, struct g_class *mp) in g_mirror_ctl_configure() argument 105 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_mirror_ctl_configure() 107 gctl_error(req, "No '%s' argument.", "nargs"); in g_mirror_ctl_configure() 111 gctl_error(req, "Invalid number of arguments."); in g_mirror_ctl_configure() 114 name = gctl_get_asciiparam(req, "arg0"); in g_mirror_ctl_configure() 116 gctl_error(req, "No 'arg%u' argument.", 0); in g_mirror_ctl_configure() 119 balancep = gctl_get_asciiparam(req, "balance"); in g_mirror_ctl_configure() 121 gctl_error(req, "No '%s' argument.", "balance"); in g_mirror_ctl_configure() 124 autosync = gctl_get_paraml(req, "autosync", sizeof(*autosync)); in g_mirror_ctl_configure() 126 gctl_error(req, "No '%s' argument.", "autosync"); in g_mirror_ctl_configure() [all …]
|
| /trueos/sys/dev/twa/ |
| HD | tw_osl_freebsd.c | 509 struct tw_osli_req_context *req; in tw_osli_alloc_mem() local 700 req = &(sc->req_ctx_buf[i]); in tw_osli_alloc_mem() 701 req->ctlr = sc; in tw_osli_alloc_mem() 702 if (bus_dmamap_create(sc->dma_tag, 0, &req->dma_map)) { in tw_osli_alloc_mem() 713 req->ioctl_wake_timeout_lock = &(req->ioctl_wake_timeout_lock_handle); in tw_osli_alloc_mem() 714 mtx_init(req->ioctl_wake_timeout_lock, "tw_ioctl_wake_timeout_lock", NULL, MTX_DEF); in tw_osli_alloc_mem() 717 tw_osli_req_q_insert_tail(req, TW_OSLI_FREE_Q); in tw_osli_alloc_mem() 736 struct tw_osli_req_context *req; in tw_osli_free_resources() local 745 while ((req = tw_osli_req_q_remove_head(sc, TW_OSLI_FREE_Q)) != in tw_osli_free_resources() 747 mtx_destroy(req->ioctl_wake_timeout_lock); in tw_osli_free_resources() [all …]
|
| HD | tw_cl_intr.c | 219 struct tw_cli_req_context *req; in tw_cli_process_resp_intr() local 238 req = &(ctlr->req_ctxt_buf[GET_RESP_ID(resp)]); in tw_cli_process_resp_intr() 241 if (req->state != TW_CLI_REQ_STATE_BUSY) { in tw_cli_process_resp_intr() 247 req, req->state); in tw_cli_process_resp_intr() 258 tw_cli_req_q_remove_item(req, TW_CLI_BUSY_Q); in tw_cli_process_resp_intr() 259 req->state = TW_CLI_REQ_STATE_COMPLETE; in tw_cli_process_resp_intr() 260 tw_cli_req_q_insert_tail(req, TW_CLI_COMPLETE_Q); in tw_cli_process_resp_intr() 284 struct tw_cli_req_context *req; in tw_cli_submit_pending_queue() local 292 while ((req = tw_cli_req_q_remove_head(ctlr, TW_CLI_PENDING_Q)) != in tw_cli_submit_pending_queue() 294 if ((error = tw_cli_submit_cmd(req))) { in tw_cli_submit_pending_queue() [all …]
|
| /trueos/sbin/gvinum/ |
| HD | gvinum.c | 139 struct gctl_req *req; in gvinum_attach() local 160 req = gctl_get_handle(); in gvinum_attach() 161 gctl_ro_param(req, "class", -1, "VINUM"); in gvinum_attach() 162 gctl_ro_param(req, "verb", -1, "attach"); in gvinum_attach() 163 gctl_ro_param(req, "child", -1, argv[1]); in gvinum_attach() 164 gctl_ro_param(req, "parent", -1, argv[2]); in gvinum_attach() 165 gctl_ro_param(req, "offset", sizeof(off_t), &offset); in gvinum_attach() 166 gctl_ro_param(req, "rename", sizeof(int), &rename); in gvinum_attach() 167 errstr = gctl_issue(req); in gvinum_attach() 170 gctl_free(req); in gvinum_attach() [all …]
|
| /trueos/contrib/wpa/src/wps/ |
| HD | http_server.c | 30 void (*cb)(void *ctx, struct http_request *req); 44 struct http_request *req = cookie; in http_request_cb() local 45 struct http_server *srv = req->srv; in http_request_cb() 49 inet_ntoa(req->cli.sin_addr), in http_request_cb() 50 ntohs(req->cli.sin_port)); in http_request_cb() 51 srv->cb(srv->cb_ctx, req); in http_request_cb() 55 "completely", inet_ntoa(req->cli.sin_addr), in http_request_cb() 56 ntohs(req->cli.sin_port)); in http_request_cb() 57 http_request_deinit(req); in http_request_cb() 64 struct http_request *req; in http_request_init() local [all …]
|
| /trueos/sys/geom/raid3/ |
| HD | g_raid3_ctl.c | 96 g_raid3_ctl_configure(struct gctl_req *req, struct g_class *mp) in g_raid3_ctl_configure() argument 108 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_raid3_ctl_configure() 110 gctl_error(req, "No '%s' argument.", "nargs"); in g_raid3_ctl_configure() 114 gctl_error(req, "Invalid number of arguments."); in g_raid3_ctl_configure() 117 autosync = gctl_get_paraml(req, "autosync", sizeof(*autosync)); in g_raid3_ctl_configure() 119 gctl_error(req, "No '%s' argument.", "autosync"); in g_raid3_ctl_configure() 122 noautosync = gctl_get_paraml(req, "noautosync", sizeof(*noautosync)); in g_raid3_ctl_configure() 124 gctl_error(req, "No '%s' argument.", "noautosync"); in g_raid3_ctl_configure() 128 gctl_error(req, "'%s' and '%s' specified.", "autosync", in g_raid3_ctl_configure() 132 failsync = gctl_get_paraml(req, "failsync", sizeof(*failsync)); in g_raid3_ctl_configure() [all …]
|
| /trueos/sys/geom/eli/ |
| HD | g_eli_ctl.c | 54 g_eli_ctl_attach(struct gctl_req *req, struct g_class *mp) in g_eli_ctl_attach() argument 66 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_eli_ctl_attach() 68 gctl_error(req, "No '%s' argument.", "nargs"); in g_eli_ctl_attach() 72 gctl_error(req, "Invalid number of arguments."); in g_eli_ctl_attach() 76 detach = gctl_get_paraml(req, "detach", sizeof(*detach)); in g_eli_ctl_attach() 78 gctl_error(req, "No '%s' argument.", "detach"); in g_eli_ctl_attach() 82 readonly = gctl_get_paraml(req, "readonly", sizeof(*readonly)); in g_eli_ctl_attach() 84 gctl_error(req, "No '%s' argument.", "readonly"); in g_eli_ctl_attach() 88 name = gctl_get_asciiparam(req, "arg0"); in g_eli_ctl_attach() 90 gctl_error(req, "No 'arg%u' argument.", 0); in g_eli_ctl_attach() [all …]
|
| /trueos/sys/ia64/ia64/ |
| HD | iodev_machdep.c | 43 static int iodev_efivar_getvar(struct iodev_efivar_req *req); 44 static int iodev_efivar_nextname(struct iodev_efivar_req *req); 45 static int iodev_efivar_setvar(struct iodev_efivar_req *req); 96 iodev_efivar_getvar(struct iodev_efivar_req *req) in iodev_efivar_getvar() argument 102 if ((req->namesize & 1) != 0 || req->namesize < 4) in iodev_efivar_getvar() 104 if (req->datasize == 0) in iodev_efivar_getvar() 113 name = malloc(req->namesize, M_TEMP, M_WAITOK | M_ZERO); in iodev_efivar_getvar() 114 error = copyin(req->name, name, req->namesize - 2); in iodev_efivar_getvar() 120 data = malloc(req->datasize, M_TEMP, M_WAITOK); in iodev_efivar_getvar() 121 error = efi_var_get(name, &req->vendor, &req->attrib, &req->datasize, in iodev_efivar_getvar() [all …]
|
| /trueos/sbin/ifconfig/ |
| HD | ifbridge.c | 128 struct ifbreq req; in do_bridgeflag() local 130 strlcpy(req.ifbr_ifsname, ifs, sizeof(req.ifbr_ifsname)); in do_bridgeflag() 132 if (do_cmd(sock, BRDGGIFFLGS, &req, sizeof(req), 0) < 0) in do_bridgeflag() 136 req.ifbr_ifsflags |= flag; in do_bridgeflag() 138 req.ifbr_ifsflags &= ~flag; in do_bridgeflag() 140 if (do_cmd(sock, BRDGSIFFLGS, &req, sizeof(req), 1) < 0) in do_bridgeflag() 148 struct ifbreq *req; in bridge_interfaces() local 170 if ((bifc.ifbic_len + sizeof(*req)) < len) in bridge_interfaces() 175 for (i = 0; i < bifc.ifbic_len / sizeof(*req); i++) { in bridge_interfaces() 176 req = bifc.ifbic_req + i; in bridge_interfaces() [all …]
|
| /trueos/sys/dev/ipmi/ |
| HD | ipmi.c | 59 #define IPMI_INIT_DRIVER_REQUEST(req, addr, cmd, reqlen, replylen) \ argument 60 bzero((req), sizeof(struct ipmi_request)); \ 61 ipmi_init_request((req), NULL, 0, (addr), (cmd), (reqlen), (replylen)) 63 #define IPMI_ALLOC_DRIVER_REQUEST(req, addr, cmd, reqlen, replylen) \ argument 64 (req) = __builtin_alloca(sizeof(struct ipmi_request) + \ 66 IPMI_INIT_DRIVER_REQUEST((req), (addr), (cmd), (reqlen), \ 159 struct ipmi_request *req; in ipmi_purge_completed_requests() local 162 req = TAILQ_FIRST(&dev->ipmi_completed_requests); in ipmi_purge_completed_requests() 163 TAILQ_REMOVE(&dev->ipmi_completed_requests, req, ir_link); in ipmi_purge_completed_requests() 165 ipmi_free_request(req); in ipmi_purge_completed_requests() [all …]
|
| /trueos/crypto/heimdal/lib/hx509/ |
| HD | req.c | 49 hx509_request_init(hx509_context context, hx509_request *req) in hx509_request_init() argument 51 *req = calloc(1, sizeof(**req)); in hx509_request_init() 52 if (*req == NULL) in hx509_request_init() 59 hx509_request_free(hx509_request *req) in hx509_request_free() argument 61 if ((*req)->name) in hx509_request_free() 62 hx509_name_free(&(*req)->name); in hx509_request_free() 63 free_SubjectPublicKeyInfo(&(*req)->key); in hx509_request_free() 64 free_ExtKeyUsage(&(*req)->eku); in hx509_request_free() 65 free_GeneralNames(&(*req)->san); in hx509_request_free() 66 memset(*req, 0, sizeof(**req)); in hx509_request_free() [all …]
|
| /trueos/sys/dev/tws/ |
| HD | tws_cam.c | 49 static void tws_scsi_complete(struct tws_request *req); 53 void tws_unmap_request(struct tws_softc *sc, struct tws_request *req); 54 int32_t tws_map_request(struct tws_softc *sc, struct tws_request *req); 63 static void tws_freeze_simq(struct tws_softc *sc, struct tws_request *req); 69 static void tws_scsi_err_complete(struct tws_request *req, 71 static void tws_passthru_err_complete(struct tws_request *req, 80 void tws_cmd_complete(struct tws_request *req); 81 void tws_aen_complete(struct tws_request *req); 83 void tws_getset_param_complete(struct tws_request *req); 92 extern void *tws_release_request(struct tws_request *req); [all …]
|
| /trueos/sys/kern/ |
| HD | kern_sysctl.c | 681 error = priv_check(req->td, PRIV_SYSCTL_DEBUG); in sysctl_sysctl_debug() 708 if (req->oldidx) in sysctl_sysctl_name() 709 error = SYSCTL_OUT(req, ".", 1); in sysctl_sysctl_name() 711 error = SYSCTL_OUT(req, buf, strlen(buf)); in sysctl_sysctl_name() 723 if (req->oldidx) in sysctl_sysctl_name() 724 error = SYSCTL_OUT(req, ".", 1); in sysctl_sysctl_name() 726 error = SYSCTL_OUT(req, oid->oid_name, in sysctl_sysctl_name() 745 error = SYSCTL_OUT(req, "", 1); in sysctl_sysctl_name() 833 error = SYSCTL_OUT(req, newoid, j * sizeof (int)); in sysctl_sysctl_next() 890 if (!req->newlen) in sysctl_sysctl_name2oid() [all …]
|
| /trueos/cddl/contrib/dtracetoolkit/Bin/ |
| D | weblatency.d | 108 self->req = stringof(this->str); 109 self->nam = strlen(self->req) > 15 ? self->req : self->nam; 110 self->req = dirname(self->req); 111 self->nam = strlen(self->req) > 15 ? self->req : self->nam; 112 self->req = dirname(self->req); 113 self->nam = strlen(self->req) > 15 ? self->req : self->nam; 114 self->req = dirname(self->req); 115 self->nam = strlen(self->req) > 15 ? self->req : self->nam; 116 self->req = dirname(self->req); 117 self->nam = strlen(self->req) > 15 ? self->req : self->nam; [all …]
|
| /trueos/cddl/contrib/dtracetoolkit/Apps/ |
| HD | weblatency.d | 108 self->req = stringof(this->str); 109 self->nam = strlen(self->req) > 15 ? self->req : self->nam; 110 self->req = dirname(self->req); 111 self->nam = strlen(self->req) > 15 ? self->req : self->nam; 112 self->req = dirname(self->req); 113 self->nam = strlen(self->req) > 15 ? self->req : self->nam; 114 self->req = dirname(self->req); 115 self->nam = strlen(self->req) > 15 ? self->req : self->nam; 116 self->req = dirname(self->req); 117 self->nam = strlen(self->req) > 15 ? self->req : self->nam; [all …]
|
| /trueos/sbin/geom/class/journal/ |
| HD | geom_journal.c | 50 static void journal_main(struct gctl_req *req, unsigned flags); 51 static void journal_clear(struct gctl_req *req); 52 static void journal_dump(struct gctl_req *req); 53 static void journal_label(struct gctl_req *req); 88 journal_main(struct gctl_req *req, unsigned flags) in journal_main() argument 95 name = gctl_get_ascii(req, "verb"); in journal_main() 97 gctl_error(req, "No '%s' argument.", "verb"); in journal_main() 101 journal_label(req); in journal_main() 103 journal_clear(req); in journal_main() 105 journal_dump(req); in journal_main() [all …]
|