Lines Matching refs:cmds
1443 tlm_commands_t *cmds;
1457 cmds = &nlp->nlp_cmds;
1458 (void) memset(cmds, 0, sizeof (*cmds));
1475 cmds->tcs_command = tlm_create_reader_writer_ipc(TRUE, xfer_size);
1476 if (!cmds->tcs_command) {
1484 tlm_release_reader_writer_ipc(cmds->tcs_command);
1517 tlm_commands_t *cmds;
1534 cmds = &nlp->nlp_cmds;
1535 (void) memset(cmds, 0, sizeof (*cmds));
1538 cmds->tcs_command = tlm_create_reader_writer_ipc(FALSE, xfer_size);
1539 if (!cmds->tcs_command) {
1547 tlm_release_reader_writer_ipc(cmds->tcs_command);
1557 tlm_release_reader_writer_ipc(cmds->tcs_command);
1585 tlm_commands_t *cmds;
1592 cmds = &nlp->nlp_cmds;
1593 if (!cmds) {
1594 NDMP_LOG(LOG_DEBUG, "cmds == NULL");
1604 if (cmds->tcs_command) {
1605 if (cmds->tcs_command->tc_buffers != NULL)
1606 tlm_release_reader_writer_ipc(cmds->tcs_command);
1609 cmds->tcs_command = NULL;
2219 * cmds (input) - pointer to the tlm_commands_t structure
2236 tlm_commands_t *cmds;
2243 cmds = argp->br_cmds;
2246 lcmd = cmds->tcs_command;
2248 cmds->tcs_reader_count++;
2258 bp.bp_cmds = cmds;
2340 cmds->tcs_reader_count--;
2369 tlm_commands_t *cmds;
2405 cmds = &nlp->nlp_cmds;
2406 cmds->tcs_reader = cmds->tcs_writer = TLM_BACKUP_RUN;
2407 cmds->tcs_command->tc_reader = TLM_BACKUP_RUN;
2408 cmds->tcs_command->tc_writer = TLM_BACKUP_RUN;
2410 if (ndmp_write_utf8magic(cmds->tcs_command) < 0) {
2424 nctx.nc_cmds = cmds;
2437 arg.br_cmds = cmds;
2453 if ((err = ndmp_tar_writer(session, params, cmds)) != 0)
2467 ndmp_wait_for_reader(cmds);
2922 tlm_commands_t *cmds;
2930 cmds = &nlp->nlp_cmds;
2931 (void) memset(cmds, 0, sizeof (*cmds));
2934 cmds->tcs_command = tlm_create_reader_writer_ipc(FALSE, xfer_size);
2935 if (!cmds->tcs_command) {
2962 tlm_commands_t *cmds;
2969 cmds = &nlp->nlp_cmds;
2970 if (!cmds) {
2971 NDMP_LOG(LOG_DEBUG, "cmds == NULL");
2975 if (cmds->tcs_command) {
2976 if (cmds->tcs_command->tc_buffers != NULL)
2977 tlm_release_reader_writer_ipc(cmds->tcs_command);
2980 cmds->tcs_command = NULL;
3152 tlm_commands_t *cmds;
3180 cmds = &nlp->nlp_cmds;
3181 cmds->tcs_reader = cmds->tcs_writer = TLM_RESTORE_RUN;
3182 cmds->tcs_command->tc_reader = TLM_RESTORE_RUN;
3183 cmds->tcs_command->tc_writer = TLM_RESTORE_RUN;
3187 arg.tr_cmds = cmds;
3192 tlm_cmd_wait(cmds->tcs_command, TLM_TAR_READER);
3198 cmds->tcs_command->tc_ref++;
3199 cmds->tcs_writer_count++;
3205 nctx.nc_cmds = cmds;
3215 ndmp_stop_local_reader(session, cmds);
3216 ndmp_wait_for_reader(cmds);
3226 err = (tm_tar_ops.tm_getdir)(cmds, cmds->tcs_command,
3242 cmds->tcs_writer_count--;
3243 cmds->tcs_command->tc_ref--;
3245 ndmp_stop_local_reader(session, cmds);
3247 ndmp_wait_for_reader(cmds);
3514 tlm_commands_t *cmds;
3540 cmds = &nlp->nlp_cmds;
3541 cmds->tcs_reader = cmds->tcs_writer = TLM_RESTORE_RUN;
3542 cmds->tcs_command->tc_reader = TLM_RESTORE_RUN;
3543 cmds->tcs_command->tc_writer = TLM_RESTORE_RUN;
3550 arg.tr_cmds = cmds;
3554 tlm_cmd_wait(cmds->tcs_command, TLM_TAR_READER);
3561 if (!ndmp_check_utf8magic(cmds->tcs_command)) {
3571 nctx.nc_cmds = cmds;
3578 ndmp_stop_local_reader(session, cmds);
3579 ndmp_wait_for_reader(cmds);
3586 cmds->tcs_command->tc_ref++;
3587 cmds->tcs_writer_count++;
3592 err = (tm_tar_ops.tm_getdir)(cmds, cmds->tcs_command,
3607 cmds->tcs_writer_count--;
3608 cmds->tcs_command->tc_ref--;
3614 ndmp_stop_local_reader(session, cmds);
3615 ndmp_wait_for_reader(cmds);