xref: /titanic_41/usr/src/lib/libbrand/common/libbrand.h (revision 99ebb4ca412cb0a19d77a3899a87c055b9c30fa8)
1 /*
2  * CDDL HEADER START
3  *
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.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_LIBBRAND_H
28 #define	_LIBBRAND_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #include <sys/types.h>
37 
38 typedef struct __brand_handle *brand_handle_t;
39 
40 extern brand_handle_t brand_open(const char *);
41 extern void brand_close(brand_handle_t);
42 
43 extern int brand_is_native(brand_handle_t);
44 
45 extern int brand_get_boot(brand_handle_t, const char *, const char *,
46     char *, size_t, int, char **);
47 extern int brand_get_brandname(brand_handle_t, char *, size_t);
48 extern int brand_get_halt(brand_handle_t, const char *, const char *,
49     char *, size_t, int, char **);
50 extern int brand_get_initname(brand_handle_t, char *, size_t);
51 extern int brand_get_install(brand_handle_t, const char *, const char *,
52     char *, size_t, int, char **);
53 extern int brand_get_installopts(brand_handle_t, char *, size_t);
54 extern int brand_get_login_cmd(brand_handle_t, const char *, char *, size_t);
55 extern int brand_get_modname(brand_handle_t, char *, size_t);
56 extern int brand_get_postclone(brand_handle_t, const char *, const char *,
57     char *, size_t, int, char **);
58 extern int brand_get_verify_cfg(brand_handle_t, char *, size_t);
59 extern int brand_get_verify_adm(brand_handle_t, const char *, const char *,
60     char *, size_t, int, char **);
61 
62 extern int brand_config_iter_privilege(brand_handle_t,
63     int (*func)(void *, const char *, const char *), void *);
64 
65 extern int brand_platform_iter_devices(brand_handle_t, const char *,
66     int (*)(void *, const char *, const char *), void *);
67 extern int brand_platform_iter_gmounts(brand_handle_t, const char *,
68     int (*)(void *, const char *, const char *, const char *, const char *),
69     void *);
70 extern int brand_platform_iter_link(brand_handle_t, int (*)(void *,
71     const char *, const char *), void *);
72 extern int brand_platform_iter_mounts(brand_handle_t, int (*)(void *,
73     const char *, const char *, const char *, const char *), void *);
74 
75 #ifdef	__cplusplus
76 }
77 #endif
78 
79 #endif	/* _LIBBRAND_H */
80