Lines Matching defs:sb
64 stream_prepare_init(stream_prepare_t *sp, const atf_process_stream_t *sb)
68 const int type = atf_process_stream_type(sb);
70 sp->m_sb = sb;
108 stream_is_valid(const atf_process_stream_t *sb)
110 return (sb->m_type == atf_process_stream_type_capture) ||
111 (sb->m_type == atf_process_stream_type_connect) ||
112 (sb->m_type == atf_process_stream_type_inherit) ||
113 (sb->m_type == atf_process_stream_type_redirect_fd) ||
114 (sb->m_type == atf_process_stream_type_redirect_path);
118 atf_process_stream_init_capture(atf_process_stream_t *sb)
120 sb->m_type = atf_process_stream_type_capture;
122 POST(stream_is_valid(sb));
127 atf_process_stream_init_connect(atf_process_stream_t *sb,
134 sb->m_type = atf_process_stream_type_connect;
135 sb->m_src_fd = src_fd;
136 sb->m_tgt_fd = tgt_fd;
138 POST(stream_is_valid(sb));
143 atf_process_stream_init_inherit(atf_process_stream_t *sb)
145 sb->m_type = atf_process_stream_type_inherit;
147 POST(stream_is_valid(sb));
152 atf_process_stream_init_redirect_fd(atf_process_stream_t *sb,
155 sb->m_type = atf_process_stream_type_redirect_fd;
156 sb->m_fd = fd;
158 POST(stream_is_valid(sb));
163 atf_process_stream_init_redirect_path(atf_process_stream_t *sb,
166 sb->m_type = atf_process_stream_type_redirect_path;
167 sb->m_path = path;
169 POST(stream_is_valid(sb));
174 atf_process_stream_fini(atf_process_stream_t *sb)
176 PRE(stream_is_valid(sb));
180 atf_process_stream_type(const atf_process_stream_t *sb)
182 PRE(stream_is_valid(sb));
184 return sb->m_type;