Lines Matching defs:hd

385 	smb_scfhandle_t	*hd;
389 if ((hd = smbfs_fh_scf_init()) == NULL)
392 rc = smbfs_fh_scf_getbool(hd, propname, &vbool);
393 smbfs_fh_scf_fini(hd);
410 smb_scfhandle_t *hd;
413 if ((hd = smbfs_fh_scf_init()) == NULL)
416 rc = smbfs_fh_scf_getint(hd, propname, vint);
417 smbfs_fh_scf_fini(hd);
428 smb_scfhandle_t *hd;
431 if ((hd = calloc(1, sizeof (smb_scfhandle_t))) == NULL)
434 hd->scf_state = SCH_STATE_INITIALIZING;
436 if ((hd->scf_handle = scf_handle_create(SCF_VERSION)) == NULL) {
437 free(hd);
441 if (scf_handle_bind(hd->scf_handle) != SCF_SUCCESS)
444 if ((hd->scf_scope = scf_scope_create(hd->scf_handle)) == NULL)
447 rc = scf_handle_get_local_scope(hd->scf_handle, hd->scf_scope);
451 if ((hd->scf_service = scf_service_create(hd->scf_handle)) == NULL)
454 rc = scf_scope_get_service(hd->scf_scope, SMB_FMRI_PREFIX,
455 hd->scf_service);
459 if ((hd->scf_pg = scf_pg_create(hd->scf_handle)) == NULL)
462 rc = scf_service_get_pg(hd->scf_service, SMB_PG_NAME, hd->scf_pg);
466 hd->scf_state = SCH_STATE_INIT;
467 return (hd);
470 smbfs_fh_scf_fini(hd);
478 smbfs_fh_scf_fini(smb_scfhandle_t *hd)
480 if (hd == NULL)
483 scf_iter_destroy(hd->scf_pg_iter);
484 scf_iter_destroy(hd->scf_inst_iter);
485 scf_scope_destroy(hd->scf_scope);
486 scf_instance_destroy(hd->scf_instance);
487 scf_service_destroy(hd->scf_service);
488 scf_pg_destroy(hd->scf_pg);
490 hd->scf_state = SCH_STATE_UNINIT;
492 (void) scf_handle_unbind(hd->scf_handle);
493 scf_handle_destroy(hd->scf_handle);
494 free(hd);
501 smbfs_fh_scf_getbool(smb_scfhandle_t *hd, const char *propname, uint8_t *vbool)
507 if (hd == NULL)
510 value = scf_value_create(hd->scf_handle);
511 prop = scf_property_create(hd->scf_handle);
516 if (scf_pg_get_property(hd->scf_pg, propname, prop) == 0) {
531 smbfs_fh_scf_getint(smb_scfhandle_t *hd, const char *propname, int64_t *vint)
537 if (hd == NULL)
540 value = scf_value_create(hd->scf_handle);
541 prop = scf_property_create(hd->scf_handle);
546 if (scf_pg_get_property(hd->scf_pg, propname, prop) == 0) {