Lines Matching defs:flag
53 rcm_alloc_handle(char *modname, uint_t flag, void *arg, rcm_handle_t **hdp)
59 if ((hdp == NULL) || (flag & ~RCM_ALLOC_HDL_MASK)) {
92 if (flag & RCM_NOPID) {
126 rcm_get_info(rcm_handle_t *hd, char *rsrcname, uint_t flag, rcm_info_t **infop)
130 if ((flag & ~RCM_GET_INFO_MASK) || (infop == NULL)) {
139 ((flag & RCM_DR_OPERATION|RCM_MOD_INFO) == 0)) {
147 return (rcm_common(CMD_GETINFO, hd, rsrcnames, flag, NULL, infop));
152 rcm_get_info_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
156 if ((flag & RCM_DR_OPERATION) || (flag & RCM_MOD_INFO)) {
161 return (rcm_common(CMD_GETINFO, hd, rsrcnames, flag, NULL, infop));
166 rcm_request_offline(rcm_handle_t *hd, char *rsrcname, uint_t flag,
174 return (rcm_request_offline_list(hd, rsrcnames, flag, infop));
179 rcm_request_offline_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
182 if (flag & ~RCM_REQUEST_MASK) {
187 return (rcm_common(CMD_OFFLINE, hd, rsrcnames, flag, NULL, infop));
192 rcm_notify_online(rcm_handle_t *hd, char *rsrcname, uint_t flag,
200 return (rcm_notify_online_list(hd, rsrcnames, flag, infop));
205 rcm_notify_online_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
208 if (flag & ~RCM_NOTIFY_MASK) {
213 return (rcm_common(CMD_ONLINE, hd, rsrcnames, flag, NULL, infop));
218 rcm_notify_remove(rcm_handle_t *hd, char *rsrcname, uint_t flag,
226 return (rcm_notify_remove_list(hd, rsrcnames, flag, infop));
231 rcm_notify_remove_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
234 if (flag & ~RCM_NOTIFY_MASK) {
239 return (rcm_common(CMD_REMOVE, hd, rsrcnames, flag, NULL, infop));
244 rcm_request_suspend(rcm_handle_t *hd, char *rsrcname, uint_t flag,
252 return (rcm_request_suspend_list(hd, rsrcnames, flag, interval, infop));
257 rcm_request_suspend_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
260 if ((flag & ~RCM_REQUEST_MASK) || (interval == NULL) ||
266 return (rcm_common(CMD_SUSPEND, hd, rsrcnames, flag, (void *)interval,
272 rcm_notify_resume(rcm_handle_t *hd, char *rsrcname, uint_t flag,
280 return (rcm_notify_resume_list(hd, rsrcnames, flag, infop));
285 rcm_notify_resume_list(rcm_handle_t *hd, char **rsrcnames, uint_t flag,
288 if (flag & ~(RCM_NOTIFY_MASK | RCM_SUSPENDED)) {
293 return (rcm_common(CMD_RESUME, hd, rsrcnames, flag, NULL, infop));
298 rcm_request_capacity_change(rcm_handle_t *hd, char *rsrcname, uint_t flag,
304 if ((nvl == NULL) || (flag & ~RCM_REQUEST_MASK)) {
312 rv = rcm_common(CMD_REQUEST_CHANGE, hd, rsrcnames, flag, (void *)nvl,
320 rcm_notify_capacity_change(rcm_handle_t *hd, char *rsrcname, uint_t flag,
326 if ((nvl == NULL) || (flag & ~RCM_REQUEST_MASK)) {
334 rv = rcm_common(CMD_NOTIFY_CHANGE, hd, rsrcnames, flag, (void *)nvl,
342 rcm_notify_event(rcm_handle_t *hd, char *rsrcname, uint_t flag, nvlist_t *nvl,
349 if ((nvl == NULL) || (flag != 0)) {
368 rcm_register_capacity(rcm_handle_t *hd, char *rsrcname, uint_t flag,
373 if (flag & ~RCM_REGISTER_MASK) {
378 flag |= RCM_REGISTER_CAPACITY;
383 return (rcm_common(CMD_REGISTER, hd, rsrcnames, flag, NULL, NULL));
388 rcm_unregister_capacity(rcm_handle_t *hd, char *rsrcname, uint_t flag)
392 if (flag & ~RCM_REGISTER_MASK) {
397 flag |= RCM_REGISTER_CAPACITY;
402 return (rcm_common(CMD_UNREGISTER, hd, rsrcnames, flag, NULL, NULL));
411 rcm_register_event(rcm_handle_t *hd, char *rsrcname, uint_t flag,
416 if (flag & ~RCM_REGISTER_MASK) {
421 flag |= RCM_REGISTER_EVENT;
426 return (rcm_common(CMD_REGISTER, hd, rsrcnames, flag, NULL, NULL));
431 rcm_unregister_event(rcm_handle_t *hd, char *rsrcname, uint_t flag)
435 if (flag & ~RCM_REGISTER_MASK) {
440 flag |= RCM_REGISTER_EVENT;
445 return (rcm_common(CMD_UNREGISTER, hd, rsrcnames, flag, NULL, NULL));
456 rcm_register_interest(rcm_handle_t *hd, char *rsrcname, uint_t flag,
461 if (flag & ~RCM_REGISTER_MASK) {
466 flag |= RCM_REGISTER_DR;
471 return (rcm_common(CMD_REGISTER, hd, rsrcnames, flag, NULL, NULL));
476 rcm_unregister_interest(rcm_handle_t *hd, char *rsrcname, uint_t flag)
480 if (flag & ~RCM_REGISTER_MASK) {
485 flag |= RCM_REGISTER_DR;
490 return (rcm_common(CMD_UNREGISTER, hd, rsrcnames, flag, NULL, NULL));
498 int flag = 0;
511 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
1326 rcm_generate_nvlist(int cmd, rcm_handle_t *hd, char **rsrcnames, uint_t flag,
1379 if (flag) {
1380 if (nvlist_add_uint32(nvl, RCM_REQUEST_FLAG, flag) != 0) {
1499 * flag set, waitpid(2) (hence rcm_exec_cmd) will fail.