8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / librestart / common / librestart_priv.h
blob520b94d758fab9c68a9eb942cc9ce1da32f8ad15
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
25 #ifndef _LIBRESTART_PRIV_H
26 #define _LIBRESTART_PRIV_H
28 #include <libscf.h>
29 #include <librestart.h>
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
35 #define RESTARTER_NAME_TYPE SCF_PROPERTY_TYPE
36 #define RESTARTER_NAME_INSTANCE "inst"
37 #define RESTARTER_NAME_STATE SCF_PROPERTY_STATE
38 #define RESTARTER_NAME_NEXT_STATE SCF_PROPERTY_NEXT_STATE
39 #define RESTARTER_NAME_AUX_STATE SCF_PROPERTY_AUX_STATE
40 #define RESTARTER_NAME_ERROR "error"
41 #define RESTARTER_NAME_REASON "reason"
43 #define RESTARTER_CHANNEL_MASTER 0
44 #define RESTARTER_CHANNEL_DELEGATE 1
46 typedef struct instance_data {
47 const char *i_fmri;
48 int i_enabled;
50 restarter_instance_state_t i_state;
51 restarter_instance_state_t i_next_state;
52 char *i_aux_state;
54 ctid_t i_primary_ctid;
55 ctid_t i_transient_ctid;
57 int i_primary_ctid_stopped;
58 int i_fault_count;
59 int i_dirty;
60 } instance_data_t;
62 char *_restarter_get_channel_name(const char *, int);
63 int _restarter_commit_states(scf_handle_t *, instance_data_t *,
64 restarter_instance_state_t, restarter_instance_state_t, const char *);
66 #ifdef __cplusplus
68 #endif
70 #endif /* _LIBRESTART_PRIV_H */