xref: /titanic_44/usr/src/cmd/allocate/allocate.h (revision 45916cd2fec6e79bca5dee0421bd39e3c2910d1e)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*45916cd2Sjpk  * Common Development and Distribution License (the "License").
6*45916cd2Sjpk  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
21*45916cd2Sjpk 
227c478bd9Sstevel@tonic-gate /*
2340e2b7c9Spaulson  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate #ifndef	_ALLOCATE_H
287c478bd9Sstevel@tonic-gate #define	_ALLOCATE_H
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
317c478bd9Sstevel@tonic-gate 
327c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
337c478bd9Sstevel@tonic-gate extern "C" {
347c478bd9Sstevel@tonic-gate #endif
357c478bd9Sstevel@tonic-gate 
367c478bd9Sstevel@tonic-gate /* Option Flags */
37*45916cd2Sjpk #define	LISTATTRS	0x00000001	/* -a */
38*45916cd2Sjpk #define	LISTDEFS	0x00000002	/* -d */
39*45916cd2Sjpk #define	TYPE		0x00000004	/* -g */
40*45916cd2Sjpk #define	LISTALL		0x00000008	/* -l */
41*45916cd2Sjpk #define	LISTFREE	0x00000010	/* -n */
42*45916cd2Sjpk #define	SILENT		0x00000020	/* -s */
43*45916cd2Sjpk #define	LISTALLOC 	0x00000040	/* -u */
44*45916cd2Sjpk #define	WINDOWING	0x00000080	/* -w */
45*45916cd2Sjpk #define	ZONENAME	0x00000100	/* -z */
46*45916cd2Sjpk #define	BOOT		0x00000200	/* -B */
47*45916cd2Sjpk #define	FORCE		0x00000400	/* -F */
48*45916cd2Sjpk #define	FORCE_ALL 	0x00000800	/* -I */
49*45916cd2Sjpk #define	USERID		0x00001000	/* -U for list_devices */
50*45916cd2Sjpk #define	USERNAME	0x00002000	/* -U for allocate */
517c478bd9Sstevel@tonic-gate 
527c478bd9Sstevel@tonic-gate /* Misc. */
537c478bd9Sstevel@tonic-gate 
54*45916cd2Sjpk #define	CLEAN_MOUNT		11	/* Also defined in disk_clean.sh */
557c478bd9Sstevel@tonic-gate 
56*45916cd2Sjpk #define	ALLOCUERR		1
57*45916cd2Sjpk #define	CHOWNERR		2
58*45916cd2Sjpk #define	CLEANERR		3
59*45916cd2Sjpk #define	CNTDEXECERR		4
60*45916cd2Sjpk #define	CNTFRCERR		5
61*45916cd2Sjpk #define	DACACCERR		6
62*45916cd2Sjpk #define	DAOFFERR		7
63*45916cd2Sjpk #define	DAUTHERR		8
64*45916cd2Sjpk #define	DEFATTRSERR		9
65*45916cd2Sjpk #define	DEVLKERR		10
66*45916cd2Sjpk #define	DEVLONGERR		11
67*45916cd2Sjpk #define	DEVNALLOCERR		12
68*45916cd2Sjpk #define	DEVNAMEERR		13
69*45916cd2Sjpk #define	DEVSTATEERR		14
70*45916cd2Sjpk #define	DEVZONEERR		15
71*45916cd2Sjpk #define	DSPMISSERR		16
72*45916cd2Sjpk #define	GLOBALERR		17
73*45916cd2Sjpk #define	LABELRNGERR		18
74*45916cd2Sjpk #define	LOGINDEVPERMERR		19
75*45916cd2Sjpk #define	NODAERR			20
76*45916cd2Sjpk #define	NODMAPERR		21
77*45916cd2Sjpk #define	PREALLOCERR		22
78*45916cd2Sjpk #define	SETACLERR		23
79*45916cd2Sjpk #define	UAUTHERR		24
80*45916cd2Sjpk #define	ZONEERR			25
817c478bd9Sstevel@tonic-gate 
827c478bd9Sstevel@tonic-gate #define	ALLOC_ERR_MODE  0100
83*45916cd2Sjpk #define	ALLOC_INVALID	0700
847c478bd9Sstevel@tonic-gate 
857c478bd9Sstevel@tonic-gate /* Functions */
86*45916cd2Sjpk extern int allocate(int optflg, uid_t uid, char *device, char *zonename);
87*45916cd2Sjpk extern int deallocate(int optflg, uid_t uid, char *device, char *zonename);
88*45916cd2Sjpk extern int list_devices(int optflg, uid_t uid, char *device, char *zonename);
897c478bd9Sstevel@tonic-gate 
907c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
917c478bd9Sstevel@tonic-gate }
927c478bd9Sstevel@tonic-gate #endif
937c478bd9Sstevel@tonic-gate 
947c478bd9Sstevel@tonic-gate #endif	/* _ALLOCATE_H */
95