rcapd_conf.c revision d75e6a5d480f559280524b60d52730c76a25524f
d75e6a5d480f559280524b60d52730c76a25524ftn * CDDL HEADER START
d75e6a5d480f559280524b60d52730c76a25524ftn * The contents of this file are subject to the terms of the
d75e6a5d480f559280524b60d52730c76a25524ftn * Common Development and Distribution License (the "License").
d75e6a5d480f559280524b60d52730c76a25524ftn * You may not use this file except in compliance with the License.
d75e6a5d480f559280524b60d52730c76a25524ftn * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d75e6a5d480f559280524b60d52730c76a25524ftn * See the License for the specific language governing permissions
d75e6a5d480f559280524b60d52730c76a25524ftn * and limitations under the License.
d75e6a5d480f559280524b60d52730c76a25524ftn * When distributing Covered Code, include this CDDL HEADER in each
d75e6a5d480f559280524b60d52730c76a25524ftn * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d75e6a5d480f559280524b60d52730c76a25524ftn * If applicable, add the following below this CDDL HEADER, with the
d75e6a5d480f559280524b60d52730c76a25524ftn * fields enclosed by brackets "[]" replaced with your own identifying
d75e6a5d480f559280524b60d52730c76a25524ftn * information: Portions Copyright [yyyy] [name of copyright owner]
d75e6a5d480f559280524b60d52730c76a25524ftn * CDDL HEADER END
d75e6a5d480f559280524b60d52730c76a25524ftn * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
d75e6a5d480f559280524b60d52730c76a25524ftn * Use is subject to license terms.
d75e6a5d480f559280524b60d52730c76a25524ftn#pragma ident "%Z%%M% %I% %E% SMI"
d75e6a5d480f559280524b60d52730c76a25524ftn * Read configuration and set the fields of an rcfg_t correspondingly.
d75e6a5d480f559280524b60d52730c76a25524ftn * Verify that the statistics file is writable, with the optional
d75e6a5d480f559280524b60d52730c76a25524ftn * verify_stat_file_creation() callback.
d75e6a5d480f559280524b60d52730c76a25524ftnrcfg_read(rcfg_t *_rcfg, int(*verify_stat_file_creation)(void))
d75e6a5d480f559280524b60d52730c76a25524ftn if ((simple_h = scf_general_pg_setup(RCAP_FMRI, CONFIG_PG))
d75e6a5d480f559280524b60d52730c76a25524ftn if (scf_read_count_property(simple_h, PRESSURE, &count_val)
d75e6a5d480f559280524b60d52730c76a25524ftn if (scf_read_count_property(simple_h, RECONFIG_INT, &count_val)
d75e6a5d480f559280524b60d52730c76a25524ftn if (scf_read_count_property(simple_h, REPORT_INT, &count_val)
d75e6a5d480f559280524b60d52730c76a25524ftn if (scf_read_count_property(simple_h, RSS_SAMPLE_INT, &count_val)
d75e6a5d480f559280524b60d52730c76a25524ftn if (scf_read_count_property(simple_h, WALK_INT, &count_val)
d75e6a5d480f559280524b60d52730c76a25524ftn * Set project mode, by default.
d75e6a5d480f559280524b60d52730c76a25524ftn if (verify_stat_file_creation != 0 && verify_stat_file_creation()
d75e6a5d480f559280524b60d52730c76a25524ftn * Modify configuration in repository given the rcfg_t structure.
d75e6a5d480f559280524b60d52730c76a25524ftn if ((simple_h = scf_general_pg_setup(RCAP_FMRI, CONFIG_PG))
d75e6a5d480f559280524b60d52730c76a25524ftn conf->rcfg_reconfiguration_interval, 0) != SCF_SUCCESS) {
d75e6a5d480f559280524b60d52730c76a25524ftn if (rval == 0) {
d75e6a5d480f559280524b60d52730c76a25524ftn } while (rval == 0);