Lines Matching refs:mgr_ctx

177 	svcctl_manager_context_t *mgr_ctx;  in svcctl_hdfree()  local
185 mgr_ctx = ctx->c_ctx.uc_mgr; in svcctl_hdfree()
186 svcctl_scm_fini(mgr_ctx); in svcctl_hdfree()
187 svcctl_scm_scf_handle_fini(mgr_ctx); in svcctl_hdfree()
188 free(mgr_ctx); in svcctl_hdfree()
216 svcctl_manager_context_t *mgr_ctx; in svcctl_mgr_hdalloc() local
222 if ((mgr_ctx = malloc(sizeof (svcctl_manager_context_t))) == NULL) { in svcctl_mgr_hdalloc()
226 bzero(mgr_ctx, sizeof (svcctl_manager_context_t)); in svcctl_mgr_hdalloc()
228 if (svcctl_scm_scf_handle_init(mgr_ctx) < 0) { in svcctl_mgr_hdalloc()
229 free(mgr_ctx); in svcctl_mgr_hdalloc()
234 if (svcctl_scm_init(mgr_ctx) < 0) { in svcctl_mgr_hdalloc()
235 svcctl_scm_scf_handle_fini(mgr_ctx); in svcctl_mgr_hdalloc()
236 free(mgr_ctx); in svcctl_mgr_hdalloc()
241 ctx->c_ctx.uc_mgr = mgr_ctx; in svcctl_mgr_hdalloc()
255 svcctl_manager_context_t *mgr_ctx; in svcctl_get_mgr_ctx() local
261 mgr_ctx = ((svcctl_context_t *)hd->nh_data)->c_ctx.uc_mgr; in svcctl_get_mgr_ctx()
263 return (mgr_ctx); in svcctl_get_mgr_ctx()
276 svcctl_manager_context_t *mgr_ctx; in svcctl_svc_hdalloc() local
280 mgr_ctx = svcctl_get_mgr_ctx(mxa, mgr_id); in svcctl_svc_hdalloc()
281 if (mgr_ctx == NULL) in svcctl_svc_hdalloc()
283 max_name_sz = mgr_ctx->mc_scf_max_fmri_len; in svcctl_svc_hdalloc()
352 svcctl_manager_context_t *mgr_ctx; in svcctl_s_ControlService() local
364 mgr_ctx = svcctl_get_mgr_ctx(mxa, svc_ctx->sc_mgrid); in svcctl_s_ControlService()
365 if (mgr_ctx == NULL) { in svcctl_s_ControlService()
389 svc = svcctl_scm_find_service(mgr_ctx, svc_ctx->sc_svcname); in svcctl_s_ControlService()
565 svcctl_manager_context_t *mgr_ctx; in svcctl_s_OpenService() local
586 mgr_ctx = ((svcctl_context_t *)hd->nh_data)->c_ctx.uc_mgr; in svcctl_s_OpenService()
587 status = svcctl_scm_validate_service(mgr_ctx, svc_name); in svcctl_s_OpenService()
619 svcctl_manager_context_t *mgr_ctx; in svcctl_s_QueryServiceStatus() local
631 mgr_ctx = svcctl_get_mgr_ctx(mxa, svc_ctx->sc_mgrid); in svcctl_s_QueryServiceStatus()
632 if (mgr_ctx == NULL) { in svcctl_s_QueryServiceStatus()
638 svc = svcctl_scm_find_service(mgr_ctx, svc_ctx->sc_svcname); in svcctl_s_QueryServiceStatus()
668 svcctl_manager_context_t *mgr_ctx; in svcctl_s_EnumDependentServices() local
681 mgr_ctx = svcctl_get_mgr_ctx(mxa, svc_ctx->sc_mgrid); in svcctl_s_EnumDependentServices()
682 if (mgr_ctx == NULL) { in svcctl_s_EnumDependentServices()
687 svc = svcctl_scm_find_service(mgr_ctx, svc_ctx->sc_svcname); in svcctl_s_EnumDependentServices()
748 svcctl_manager_context_t *mgr_ctx; in svcctl_s_EnumServicesStatus() local
763 mgr_ctx = ((svcctl_context_t *)hd->nh_data)->c_ctx.uc_mgr; in svcctl_s_EnumServicesStatus()
764 if (svcctl_scm_refresh(mgr_ctx) != 0) { in svcctl_s_EnumServicesStatus()
778 param->bytes_needed = mgr_ctx->mc_bytes_needed; in svcctl_s_EnumServicesStatus()
786 svc_num = svcctl_scm_enum_services(mgr_ctx, param->services, in svcctl_s_EnumServicesStatus()
795 param->bytes_needed = mgr_ctx->mc_bytes_needed; in svcctl_s_EnumServicesStatus()
825 svcctl_manager_context_t *mgr_ctx; in svcctl_s_QueryServiceConfig() local
839 mgr_ctx = svcctl_get_mgr_ctx(mxa, svc_ctx->sc_mgrid); in svcctl_s_QueryServiceConfig()
840 if (mgr_ctx == NULL) { in svcctl_s_QueryServiceConfig()
846 svc = svcctl_scm_find_service(mgr_ctx, svc_ctx->sc_svcname); in svcctl_s_QueryServiceConfig()
892 svcctl_manager_context_t *mgr_ctx; in svcctl_s_StartService() local
903 mgr_ctx = svcctl_get_mgr_ctx(mxa, svc_ctx->sc_mgrid); in svcctl_s_StartService()
904 if (mgr_ctx == NULL) { in svcctl_s_StartService()
909 svc = svcctl_scm_find_service(mgr_ctx, svc_ctx->sc_svcname); in svcctl_s_StartService()
933 svcctl_manager_context_t *mgr_ctx; in svcctl_s_GetServiceDisplayNameW() local
943 mgr_ctx = ((svcctl_context_t *)hd->nh_data)->c_ctx.uc_mgr; in svcctl_s_GetServiceDisplayNameW()
944 svc = svcctl_scm_find_service(mgr_ctx, (char *)param->service_name); in svcctl_s_GetServiceDisplayNameW()
980 svcctl_manager_context_t *mgr_ctx; in svcctl_s_GetServiceKeyNameW() local
990 mgr_ctx = ((svcctl_context_t *)hd->nh_data)->c_ctx.uc_mgr; in svcctl_s_GetServiceKeyNameW()
991 svc = svcctl_scm_find_service(mgr_ctx, (char *)param->service_name); in svcctl_s_GetServiceKeyNameW()
1071 svcctl_manager_context_t *mgr_ctx; in svcctl_s_OpenServiceA() local
1092 mgr_ctx = ((svcctl_context_t *)hd->nh_data)->c_ctx.uc_mgr; in svcctl_s_OpenServiceA()
1093 status = svcctl_scm_validate_service(mgr_ctx, svc_name); in svcctl_s_OpenServiceA()
1123 svcctl_manager_context_t *mgr_ctx; in svcctl_s_EnumServicesStatusA() local
1139 mgr_ctx = ((svcctl_context_t *)hd->nh_data)->c_ctx.uc_mgr; in svcctl_s_EnumServicesStatusA()
1140 if (svcctl_scm_refresh(mgr_ctx) != 0) { in svcctl_s_EnumServicesStatusA()
1152 svc_num = svcctl_scm_enum_services(mgr_ctx, param->services, in svcctl_s_EnumServicesStatusA()
1161 param->bytes_needed = mgr_ctx->mc_bytes_needed; in svcctl_s_EnumServicesStatusA()
1193 svcctl_manager_context_t *mgr_ctx; in svcctl_s_QueryServiceConfig2W() local
1225 mgr_ctx = svcctl_get_mgr_ctx(mxa, svc_ctx->sc_mgrid); in svcctl_s_QueryServiceConfig2W()
1226 if (mgr_ctx == NULL) { in svcctl_s_QueryServiceConfig2W()
1231 svc = svcctl_scm_find_service(mgr_ctx, svc_ctx->sc_svcname); in svcctl_s_QueryServiceConfig2W()
1307 svcctl_manager_context_t *mgr_ctx; in svcctl_s_QueryServiceStatusEx() local
1322 mgr_ctx = svcctl_get_mgr_ctx(mxa, svc_ctx->sc_mgrid); in svcctl_s_QueryServiceStatusEx()
1323 if (mgr_ctx == NULL) { in svcctl_s_QueryServiceStatusEx()
1349 svc = svcctl_scm_find_service(mgr_ctx, svc_ctx->sc_svcname); in svcctl_s_QueryServiceStatusEx()