1scf_entry_createS(e3rSvCiFc)e Configuration Facility Library Funscctfi_oennstry_create(3SCF)
2
3
4

NAME

6       scf_entry_create,          scf_entry_handle,         scf_entry_destroy,
7       scf_entry_destroy_children, scf_entry_reset, scf_entry_add_value - cre‐
8       ate and manipulate transaction in the Service Configuration Facility
9

SYNOPSIS

11       cc [ flag... ] file... -lscf [ library... ]
12       #include <libscf.h>
13
14       scf_transaction_entry_t *scf_entry_create(scf_handle_t *handle);
15
16
17       scf_handle_t *scf_entry_handle(scf_transaction_entry_t *entry);
18
19
20       void scf_entry_destroy(scf_transaction_entry_t *entry);
21
22
23       void scf_entry_destroy_children(scf_transaction_entry_t *entry);
24
25
26       void scf_entry_reset(scf_transaction_entry_t *entry);
27
28
29       int scf_entry_add_value(scf_transaction_entry_t *entry,
30            scf_value_t *value);
31
32

DESCRIPTION

34       The  scf_entry_create() function allocates a new transaction entry han‐
35       dle. The scf_entry_destroy() function destroys  the  transaction  entry
36       handle.
37
38
39       The  scf_entry_handle()  function  retrieves the handle associated with
40       entry.
41
42
43       A transaction entry represents a single action on a property in a prop‐
44       erty  group.  If  an entry is added to a transaction using scf_transac‐
45       tion_property_new(3SCF),   scf_transaction_property_change(3SCF),    or
46       scf_transaction_property_change_type(3SCF),  scf_entry_add_value()  can
47       be called zero or more times to set up the set of values for that prop‐
48       erty. Each value must be set and of a compatible type to the type asso‐
49       ciated with the entry. When later retrieved from the property, the val‐
50       ues  will  have the type of the entry. If the values are committed suc‐
51       cessfully with scf_transaction_commit(3SCF), they will be  set  in  the
52       order in which they were added with scf_entry_add_value().
53
54
55       The scf_entry_reset() function resets a transaction entry, disassociat‐
56       ing it from any transaction it is a part of (invalidating the  transac‐
57       tion  in the process), and disassociating any values that were added to
58       it.
59
60
61       The scf_entry_destroy_children() function destroys all  values  associ‐
62       ated with the transaction entry. The entry itself is not destroyed.
63

RETURN VALUES

65       Upon successful completion, scf_entry_create() returns a new scf_trans‐
66       action_entry_t. Otherwise, it returns NULL.
67
68
69       Upon successful completion, scf_entry_handle() returns the handle asso‐
70       ciated with the transaction entry. Otherwise, it returns NULL.
71
72
73       Upon successful completion, scf_entry_add_value() returns 0. Otherwise,
74       it returns -1.
75

ERRORS

77       The scf_entry_create() function will fail if:
78
79       SCF_ERROR_INVALID_ARGUMENT    The handle argument is NULL.
80
81
82       SCF_ERROR_NO_MEMORY           There is not enough memory to allocate an
83                                     scf_transaction_entry_t.
84
85
86
87       The scf_entry_handle() function will fail if:
88
89       SCF_ERROR_HANDLE_DESTROYED    The handle associated with entry has been
90                                     destroyed.
91
92
93
94       The scf_entry_add_value() function will fail if:
95
96       SCF_ERROR_HANDLE_MISMATCH     The value and  entry  arguments  are  not
97                                     derived from the same handle.
98
99
100       SCF_ERROR_IN_USE              The  value  has  been  added  to  another
101                                     entry.
102
103
104       SCF_ERROR_INTERNAL            An internal error occurred.
105
106
107       SCF_ERROR_INVALID_ARGUMENT    The value argument is  not  set,  or  the
108                                     entry  was added to the transaction using
109                                     scf_transaction_property_delete(3SCF).
110
111
112       SCF_ERROR_NOT_SET             The transaction entry is  not  associated
113                                     with a transaction.
114
115
116       SCF_ERROR_TYPE_MISMATCH       The  type  of the value argument does not
117                                     match  the  type  that  was   set   using
118                                     scf_transaction_property_new(),
119                                     scf_transaction_property_change(),     or
120                                     scf_transaction_property_change_type().
121
122
123
124       The scf_error(3SCF) function can be used to retrieve the error value.
125

ATTRIBUTES

127       See attributes(5) for descriptions of the following attributes:
128
129
130
131
132       ┌─────────────────────────────┬─────────────────────────────┐
133       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
134       ├─────────────────────────────┼─────────────────────────────┤
135       │Interface Stability          │Committed                    │
136       ├─────────────────────────────┼─────────────────────────────┤
137       │MT-Level                     │Safe                         │
138       └─────────────────────────────┴─────────────────────────────┘
139

SEE ALSO

141       libscf(3LIB), scf_error(3SCF), scf_transaction_commit(3SCF), scf_trans‐
142       action_property_change(3SCF),                     scf_transaction_prop‐
143       erty_change_type(3SCF),          scf_transaction_property_delete(3SCF),
144       scf_transaction_property_new(3SCF),        scf_transaction_reset(3SCF),
145       attributes(5)
146
147
148
149SunOS 5.11                        17 Jul 2008           scf_entry_create(3SCF)
Impressum