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]
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #pragma ident "%Z%%M% %I% %E% SMI"
37 #define LISTATTRS 0x00000001 /* -a */
38 #define CLASS 0x00000002 /* -c */
39 #define LISTDEFS 0x00000004 /* -d */
40 #define TYPE 0x00000008 /* -g */
41 #define LISTALL 0x00000010 /* -l */
42 #define LISTFREE 0x00000020 /* -n */
43 #define SILENT 0x00000040 /* -s */
44 #define LISTALLOC 0x00000080 /* -u */
45 #define WINDOWING 0x00000100 /* -w */
46 #define ZONENAME 0x00000200 /* -z */
47 #define BOOT 0x00000400 /* -B */
48 #define FORCE 0x00000800 /* -F */
49 #define FORCE_ALL 0x00001000 /* -I */
50 #define USERID 0x00002000 /* -U for list_devices */
51 #define USERNAME 0x00004000 /* -U for allocate */
53 /* Device clean program exit codes */
56 #define DEVCLEAN_ERROR 1
57 #define DEVCLEAN_SYSERR 2
58 #define DEVCLEAN_BADMOUNT 3
59 #define DEVCLEAN_MOUNTOK 4
61 /* Error/Exit codes */
64 /* Skip 3 to avoid conflict with DEVCLEAN_BADMOUNT */
73 #define DEVNALLOCERR 12
75 #define DEVSTATEERR 14
79 #define LABELRNGERR 18
80 #define LOGINDEVPERMERR 19
83 #define PREALLOCERR 22
89 #define ALLOC_ERRID (uid_t)2 /* bin */
90 #define ALLOC_ERR_MODE 0100
93 extern int allocate(int optflg
, uid_t uid
, char *device
, char *zonename
);
94 extern int deallocate(int optflg
, uid_t uid
, char *device
, char *zonename
);
95 extern int list_devices(int optflg
, uid_t uid
, char *device
, char *zonename
);
101 #endif /* _ALLOCATE_H */