Lines Matching refs:flag

52 rcm_alloc_handle(char *modname, uint_t flag, void *arg, rcm_handle_t **hdp)
58 if ((hdp == NULL) || (flag & ~RCM_ALLOC_HDL_MASK)) {
91 if (flag & RCM_NOPID) {
125 rcm_get_info(rcm_handle_t *hd, char *rsrcname, uint_t flag, rcm_info_t **infop)
129 if ((flag & ~RCM_GET_INFO_MASK) || (infop == NULL)) {
138 ((flag & RCM_DR_OPERATION|RCM_MOD_INFO) == 0)) {
146 return (rcm_common(CMD_GETINFO, hd, rsrcnames, flag, NULL, infop));
151 rcm_get_info_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
155 if ((flag & RCM_DR_OPERATION) || (flag & RCM_MOD_INFO)) {
160 return (rcm_common(CMD_GETINFO, hd, rsrcnames, flag, NULL, infop));
165 rcm_request_offline(rcm_handle_t *hd, char *rsrcname, uint_t flag,
173 return (rcm_request_offline_list(hd, rsrcnames, flag, infop));
178 rcm_request_offline_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
181 if (flag & ~RCM_REQUEST_MASK) {
186 return (rcm_common(CMD_OFFLINE, hd, rsrcnames, flag, NULL, infop));
191 rcm_notify_online(rcm_handle_t *hd, char *rsrcname, uint_t flag,
199 return (rcm_notify_online_list(hd, rsrcnames, flag, infop));
204 rcm_notify_online_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
207 if (flag & ~RCM_NOTIFY_MASK) {
212 return (rcm_common(CMD_ONLINE, hd, rsrcnames, flag, NULL, infop));
217 rcm_notify_remove(rcm_handle_t *hd, char *rsrcname, uint_t flag,
225 return (rcm_notify_remove_list(hd, rsrcnames, flag, infop));
230 rcm_notify_remove_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
233 if (flag & ~RCM_NOTIFY_MASK) {
238 return (rcm_common(CMD_REMOVE, hd, rsrcnames, flag, NULL, infop));
243 rcm_request_suspend(rcm_handle_t *hd, char *rsrcname, uint_t flag,
251 return (rcm_request_suspend_list(hd, rsrcnames, flag, interval, infop));
256 rcm_request_suspend_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
259 if ((flag & ~RCM_REQUEST_MASK) || (interval == NULL) ||
265 return (rcm_common(CMD_SUSPEND, hd, rsrcnames, flag, (void *)interval,
271 rcm_notify_resume(rcm_handle_t *hd, char *rsrcname, uint_t flag,
279 return (rcm_notify_resume_list(hd, rsrcnames, flag, infop));
284 rcm_notify_resume_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
287 if (flag & ~(RCM_NOTIFY_MASK | RCM_SUSPENDED)) {
292 return (rcm_common(CMD_RESUME, hd, rsrcnames, flag, NULL, infop));
297 rcm_request_capacity_change(rcm_handle_t *hd, char *rsrcname, uint_t flag,
303 if ((nvl == NULL) || (flag & ~RCM_REQUEST_MASK)) {
311 rv = rcm_common(CMD_REQUEST_CHANGE, hd, rsrcnames, flag, (void *)nvl,
319 rcm_notify_capacity_change(rcm_handle_t *hd, char *rsrcname, uint_t flag,
325 if ((nvl == NULL) || (flag & ~RCM_NOTIFY_MASK)) {
333 rv = rcm_common(CMD_NOTIFY_CHANGE, hd, rsrcnames, flag, (void *)nvl,
341 rcm_notify_event(rcm_handle_t *hd, char *rsrcname, uint_t flag, nvlist_t *nvl,
348 if ((nvl == NULL) || (flag != 0)) {
367 rcm_register_capacity(rcm_handle_t *hd, char *rsrcname, uint_t flag,
372 if (flag & ~RCM_REGISTER_MASK) {
377 flag |= RCM_REGISTER_CAPACITY;
382 return (rcm_common(CMD_REGISTER, hd, rsrcnames, flag, NULL, NULL));
387 rcm_unregister_capacity(rcm_handle_t *hd, char *rsrcname, uint_t flag)
391 if (flag & ~RCM_REGISTER_MASK) {
396 flag |= RCM_REGISTER_CAPACITY;
401 return (rcm_common(CMD_UNREGISTER, hd, rsrcnames, flag, NULL, NULL));
410 rcm_register_event(rcm_handle_t *hd, char *rsrcname, uint_t flag,
415 if (flag & ~RCM_REGISTER_MASK) {
420 flag |= RCM_REGISTER_EVENT;
425 return (rcm_common(CMD_REGISTER, hd, rsrcnames, flag, NULL, NULL));
430 rcm_unregister_event(rcm_handle_t *hd, char *rsrcname, uint_t flag)
434 if (flag & ~RCM_REGISTER_MASK) {
439 flag |= RCM_REGISTER_EVENT;
444 return (rcm_common(CMD_UNREGISTER, hd, rsrcnames, flag, NULL, NULL));
455 rcm_register_interest(rcm_handle_t *hd, char *rsrcname, uint_t flag,
460 if (flag & ~RCM_REGISTER_MASK) {
465 flag |= RCM_REGISTER_DR;
470 return (rcm_common(CMD_REGISTER, hd, rsrcnames, flag, NULL, NULL));
475 rcm_unregister_interest(rcm_handle_t *hd, char *rsrcname, uint_t flag)
479 if (flag & ~RCM_REGISTER_MASK) {
484 flag |= RCM_REGISTER_DR;
489 return (rcm_common(CMD_UNREGISTER, hd, rsrcnames, flag, NULL, NULL));
497 int flag = 0;
510 result = rcm_common(CMD_GETSTATE, hd, rsrcnames, flag, NULL, &infop);
981 rcm_common(int cmd, rcm_handle_t *hd, char **rsrcnames, uint_t flag, void *arg,
996 if ((flag & (RCM_DR_OPERATION | RCM_MOD_INFO)) == 0) {
1015 return (rcm_direct_call(cmd, hd, rsrcnames, flag, arg, infop));
1031 return (rcm_daemon_call(cmd, hd, rsrcnames, flag, arg, infop));
1038 rcm_direct_call(int cmd, rcm_handle_t *hd, char **rsrcnames, uint_t flag,
1046 error = ops->librcm_getinfo(rsrcnames, flag, hd->seq_num,
1051 error = ops->librcm_offline(rsrcnames, hd->pid, flag,
1056 error = ops->librcm_online(rsrcnames, hd->pid, flag,
1061 error = ops->librcm_remove(rsrcnames, hd->pid, flag,
1066 error = ops->librcm_suspend(rsrcnames, hd->pid, flag,
1071 error = ops->librcm_resume(rsrcnames, hd->pid, flag,
1077 flag, infop);
1082 flag);
1086 error = ops->librcm_request_change(rsrcnames[0], hd->pid, flag,
1091 error = ops->librcm_notify_change(rsrcnames[0], hd->pid, flag,
1096 error = ops->librcm_notify_event(rsrcnames[0], hd->pid, flag,
1120 rcm_daemon_call(int cmd, rcm_handle_t *hd, char **rsrcnames, uint_t flag,
1169 if (rcm_generate_nvlist(cmd, hd, rsrcnames, flag, arg, &nvl_packed,
1193 * was nvlist_alloc'ed without the NV_UNIQUE_NAME flag. Implement
1327 rcm_generate_nvlist(int cmd, rcm_handle_t *hd, char **rsrcnames, uint_t flag,
1380 if (flag) {
1381 if (nvlist_add_uint32(nvl, RCM_REQUEST_FLAG, flag) != 0) {
1501 * flag set, waitpid(2) (hence rcm_exec_cmd) will fail.