8999 SMBIOS: cleanup 32-bit specific code
[unleashed.git] / usr / src / head / nsctl.h
blobccfd6b71aa97c38163cc04ff077785f2038f85e7
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 2014 Garrett D'Amore <garrett@damore.org>
24 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 #ifndef _NSCTL_H
29 #define _NSCTL_H
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
35 #include <sys/nsctl/nsctl.h>
39 * External file descriptor.
42 #ifndef _LIBNSCTL_H
43 #ifndef _KMEMUSER
44 typedef struct nsc_fd_s { int x; } nsc_fd_t;
45 #endif
46 #endif
50 * Runtime Solaris release checking.
52 * nsc_check_release() is called with the string build release
53 * (BUILD_REV_STR) and an optional array of nsc_release_t. The array
54 * defines a map of build release to acceptable runtime release for the
55 * component. The build release is always an acceptable runtime
56 * release and need not be included in the map.
58 * build - the build release (e.g. "5.7")
59 * runtime - comma &/or space separated list of acceptable runtime
60 * releases (e.g. "5.7, 5.8")
63 typedef struct nsc_release {
64 const char *build; /* build release */
65 const char *runtime; /* runtime release(s) */
66 } nsc_release_t;
68 extern void _nsc_nocheck(void);
69 extern nsc_fd_t *nsc_open(char *, int, int);
70 extern nsc_fd_t *nsc_fdopen(int, char *, int);
71 extern int nsc_close(nsc_fd_t *);
72 extern int nsc_fileno(nsc_fd_t *);
73 extern int nsc_reserve(nsc_fd_t *);
74 extern int nsc_release(nsc_fd_t *);
75 extern int nsc_partsize(nsc_fd_t *, nsc_size_t *);
76 extern int nsc_freeze(char *path);
77 extern int nsc_unfreeze(char *path);
78 extern int nsc_isfrozen(char *path);
79 extern int nsc_getsystemid(int *id);
80 extern int nsc_name_to_id(char *name, int *id);
81 extern int nsc_id_to_name(char **name, int id);
82 extern int nsc_check_release(const char *, nsc_release_t *, char **);
84 #ifdef __cplusplus
86 #endif
88 #endif /* _NSCTL_H */