uadmin.h revision 753a6d457b330b1b29b2d3eefcd0831116ce950d
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * CDDL HEADER START
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * The contents of this file are subject to the terms of the
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * Common Development and Distribution License (the "License").
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * You may not use this file except in compliance with the License.
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * or http://www.opensolaris.org/os/licensing.
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * See the License for the specific language governing permissions
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * and limitations under the License.
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * When distributing Covered Code, include this CDDL HEADER in each
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * If applicable, add the following below this CDDL HEADER, with the
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * fields enclosed by brackets "[]" replaced with your own identifying
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * information: Portions Copyright [yyyy] [name of copyright owner]
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * CDDL HEADER END
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * Use is subject to license terms.
919ca0cd7bf1dee3c8021e1c80bd699c7a386001Andrew Forrest/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
919ca0cd7bf1dee3c8021e1c80bd699c7a386001Andrew Forrest/* All Rights Reserved */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest/* 17-21 reserved for obsolete interface */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define A_CONFIG 23 /* For system configuration */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_IBOOT 2 /* multi-user reboot, ask for name of file */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_SIBOOT 4 /* single-user reboot, ask for name of file */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_NOSYNC 7 /* do not sync filesystems on next A_DUMP */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_FASTREBOOT 8 /* bypass firmware and boot loader */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_FASTREBOOT_DRYRUN 9 /* Fast reboot Dry run */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * Functions reserved for A_FREEZE (may not be available on all platforms)
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * Note: AD_COMPRESS, AD_CHECK and AD_FORCE are now obsolete
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * The first two are succeeded by AD_SUSPEND_TO_DISK and
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * AD_CHECK_SUSPEND_TO_DISK respectively.
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * AD_FORCE should not be used by any new application
6197cac1b7f675588382db0a6f279614032b5568David Luna * We maintain compatibility with the earlier interfaces:
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * AD_COMPRESS and AD_CHECK, by preserving those values
6197cac1b7f675588382db0a6f279614032b5568David Luna * in the corresponding new interfaces
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_COMPRESS 0 /* store state file compressed during CPR */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_FORCE 1 /* force to do AD_COMPRESS */
919ca0cd7bf1dee3c8021e1c80bd699c7a386001Andrew Forrest#define AD_CHECK 2 /* test if CPR module is available */
919ca0cd7bf1dee3c8021e1c80bd699c7a386001Andrew Forrest#define AD_SUSPEND_TO_DISK AD_COMPRESS /* A_FREEZE, CPR or ACPI S4 */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_CHECK_SUSPEND_TO_DISK AD_CHECK /* A_FREEZE, CPR/S4 capable? */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_SUSPEND_TO_RAM 20 /* A_FREEZE, S3 */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_CHECK_SUSPEND_TO_RAM 21 /* A_FREEZE, S3 capable? */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * NOTE: the following defines comprise an Unstable interface. Their semantics
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * may change or they may be removed completely in a later release
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_REUSEINIT 3 /* prepare for AD_REUSABLE */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_REUSABLE 4 /* create reusable statefile */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_REUSEFINI 5 /* revert to normal CPR mode (not reusable) */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * Functions of A_CONFIG. Unstable interface.
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define AD_UPDATE_BOOT_CONFIG 1 /* Update boot config variables */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * When 'mdep' (the second argument to uadmin(2)) is initialized for A_REBOOT,
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * A_SHUTDOWN or A_DUMP, it represents the boot arguments string of at most
6197cac1b7f675588382db0a6f279614032b5568David Luna * 256 characters.
ece5a262d20a50d0abf584d0f7ec73929ede9cfdJaco Jooste * FMRI for boot-config service.
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * Property group that contains all Fast Reboot configuration properties.
919ca0cd7bf1dee3c8021e1c80bd699c7a386001Andrew Forrest * Property group that contains all Fast Reboot blacklisting information.
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define BOOT_CONFIG_PG_FBBLACKLIST "fastreboot_blacklist"
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#endif /* _KERNEL */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest * Flag representations of fastboot configuration.
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define FASTREBOOT_ONPANIC "fastreboot_onpanic"
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#define FASTREBOOT_ONPANIC_CMDLINE "fastreboot_onpanic_cmdline"
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrestextern void mdboot(int, int, char *, boolean_t);
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrestextern void mdpreboot(int, int, char *);
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrestextern int kadmin(int, int, void *, cred_t *);
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#endif /* _ASM */
864e2a74d7dc5e572cd895466611cc57e3523083Andrew Forrest#endif /* _SYS_UADMIN_H */