xref: /titanic_50/usr/src/cmd/allocate/allocate.h (revision 35fe197b91640f2efc8c0b3849eee882e373c729)
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	_ALLOCATE_H
28 #define	_ALLOCATE_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /* Option Flags */
37 #define	LISTATTRS	0x00000001	/* -a */
38 #define	LISTDEFS	0x00000002	/* -d */
39 #define	TYPE		0x00000004	/* -g */
40 #define	LISTALL		0x00000008	/* -l */
41 #define	LISTFREE	0x00000010	/* -n */
42 #define	SILENT		0x00000020	/* -s */
43 #define	LISTALLOC 	0x00000040	/* -u */
44 #define	WINDOWING	0x00000080	/* -w */
45 #define	ZONENAME	0x00000100	/* -z */
46 #define	BOOT		0x00000200	/* -B */
47 #define	FORCE		0x00000400	/* -F */
48 #define	FORCE_ALL 	0x00000800	/* -I */
49 #define	USERID		0x00001000	/* -U for list_devices */
50 #define	USERNAME	0x00002000	/* -U for allocate */
51 
52 /* Misc. */
53 
54 #define	CLEAN_MOUNT		11	/* Also defined in disk_clean.sh */
55 
56 #define	ALLOCUERR		1
57 #define	CHOWNERR		2
58 #define	CLEANERR		3
59 #define	CNTDEXECERR		4
60 #define	CNTFRCERR		5
61 #define	DACACCERR		6
62 #define	DAOFFERR		7
63 #define	DAUTHERR		8
64 #define	DEFATTRSERR		9
65 #define	DEVLKERR		10
66 #define	DEVLONGERR		11
67 #define	DEVNALLOCERR		12
68 #define	DEVNAMEERR		13
69 #define	DEVSTATEERR		14
70 #define	DEVZONEERR		15
71 #define	DSPMISSERR		16
72 #define	GLOBALERR		17
73 #define	LABELRNGERR		18
74 #define	LOGINDEVPERMERR		19
75 #define	NODAERR			20
76 #define	NODMAPERR		21
77 #define	PREALLOCERR		22
78 #define	SETACLERR		23
79 #define	UAUTHERR		24
80 #define	ZONEERR			25
81 
82 #define	ALLOC_ERR_MODE  0100
83 #define	ALLOC_INVALID	0700
84 
85 /* Functions */
86 extern int allocate(int optflg, uid_t uid, char *device, char *zonename);
87 extern int deallocate(int optflg, uid_t uid, char *device, char *zonename);
88 extern int list_devices(int optflg, uid_t uid, char *device, char *zonename);
89 
90 #ifdef	__cplusplus
91 }
92 #endif
93 
94 #endif	/* _ALLOCATE_H */
95