gptzfsboot and zfsloader can't find slices inside PTABLE_VTOC label after 9099
[unleashed.git] / share / man / man3scf / scf_simple_walk_instances.3scf
blob5fe2759df39407d0dfafdc72a59ab0d637a16202
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SCF_SIMPLE_WALK_INSTANCES 3SCF "Aug 17, 2004"
7 .SH NAME
8 scf_simple_walk_instances \- observational interface for Service Configuration
9 Facility
10 .SH SYNOPSIS
11 .LP
12 .nf
13 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lscf\fR [ \fIlibrary\fR\&.\|.\|. ]
14 #include <libscf.h>
16 \fBint\fR \fBscf_simple_walk_instances\fR(\fBuint_t\fR \fIflags\fR, \fBvoid *\fR\fIprivate\fR,
17      \fBint (*\fR\fIinst_callback\fR)(scf_handle_t *, scf_instance_t *, void *));
18 .fi
20 .SH DESCRIPTION
21 .sp
22 .LP
23 The \fBscf_simple_walk_instances()\fR function iterates over every service
24 instance in a specified state and calls a callback function provided by the
25 user on each specified instance.
26 .sp
27 .LP
28 The function takes a \fIflags\fR argument to indicate which instance states are
29 involved in the iteration, an opaque buffer to be passed to the callback
30 function, and a callback function with three arguments, a handle, an instance
31 pointer, and an opaque buffer. If the callback function returns a value other
32 than success, iteration is ended, an error is set, and the function returns -1.
33 .sp
34 .LP
35 The handle passed to the callback function is provided to the callback function
36 by the library. This handle is used by the callback function for all low-level
37 allocation involved in the function.
38 .sp
39 .LP
40 The simplified library provides defined constants for the \fIflags\fR argument.
41 The user can use a bitwise OR to apply more than one flag. The
42 \fBSCF_STATE_ALL\fR flag is a bitwise OR of all the other states.The flags are:
43 .RS +4
44 .TP
45 .ie t \(bu
46 .el o
47 \fBSCF_STATE_UNINIT\fR
48 .RE
49 .RS +4
50 .TP
51 .ie t \(bu
52 .el o
53 \fBSCF_STATE_MAINT\fR
54 .RE
55 .RS +4
56 .TP
57 .ie t \(bu
58 .el o
59 \fBSCF_STATE_OFFLINE\fR
60 .RE
61 .RS +4
62 .TP
63 .ie t \(bu
64 .el o
65 \fBSCF_STATE_DISABLED\fR
66 .RE
67 .RS +4
68 .TP
69 .ie t \(bu
70 .el o
71 \fBSCF_STATE_ONLINE\fR
72 .RE
73 .RS +4
74 .TP
75 .ie t \(bu
76 .el o
77 \fBSCF_STATE_DEGRADED\fR
78 .RE
79 .RS +4
80 .TP
81 .ie t \(bu
82 .el o
83 \fBSCF_STATE_ALL\fR
84 .RE
85 .SH RETURN VALUES
86 .sp
87 .LP
88 Upon successful completion, \fBscf_simple_walk_instances()\fR returns 0.
89 Otherwise, it returns -1.
90 .SH ATTRIBUTES
91 .sp
92 .LP
93 See \fBattributes\fR(5) for descriptions of the following attributes:
94 .sp
96 .sp
97 .TS
98 box;
99 c | c
100 l | l .
101 ATTRIBUTE TYPE  ATTRIBUTE VALUE
103 Interface Stability     Evolving
105 MT-Level        MT-Safe
108 .SH SEE ALSO
111 \fBlibscf\fR(3LIB), \fBattributes\fR(5)