libbe_priv.h revision 7e0e2549bfaa531aff576083ab0c07f84fa8fb27
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER START
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The contents of this file are subject to the terms of the
74a31ce69a88d851777ca840d31ec610ce9ecab3timh * Common Development and Distribution License (the "License").
74a31ce69a88d851777ca840d31ec610ce9ecab3timh * You may not use this file except in compliance with the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * See the License for the specific language governing permissions
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * and limitations under the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * When distributing Covered Code, include this CDDL HEADER in each
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * If applicable, add the following below this CDDL HEADER, with the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * fields enclosed by brackets "[]" replaced with your own identifying
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * information: Portions Copyright [yyyy] [name of copyright owner]
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER END
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern "C" {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#define BE_POLICY_PROPERTY "org.opensolaris.libbe:policy"
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#define BE_GRUB_COMMENT "#============ End of LIBBE entry ============="
if (_zhp) { \
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
typedef struct be_transaction_data {
typedef struct be_mount_data {
typedef struct be_unmount_data {
typedef struct be_destroy_data {
typedef struct be_demote_data {
typedef struct be_fs_list_data {
char *altroot;
char **fs_list;
int fs_num;
typedef struct be_plcy_list {
char *be_plcy_name;
int be_num_max;
int be_num_min;
int be_usage_pcnt;
struct be_defaults {
/* be_create.c */
int be_set_uuid(char *);
/* be_list.c */
/* be_mount.c */
int _be_mount(char *, char **, int);
int _be_unmount(char *, int);
char *be_get_ds_from_dir(char *);
int be_make_tmp_mountpoint(char **);
/* be_snapshot.c */
int _be_create_snapshot(char *, char **, char *);
int _be_destroy_snapshot(char *, char *);
/* be_utils.c */
void be_zfs_fini(void);
void be_make_root_ds(const char *, const char *, char *, int);
void be_make_container_ds(const char *, char *, int);
char *be_make_name_from_ds(const char *, char *);
int be_append_menu(char *, char *, char *, char *, char *);
int be_remove_menu(char *, char *, char *);
int be_update_menu(char *, char *, char *, char *);
int be_default_grub_bootfs(const char *, char **);
int be_run_cmd(char *, char *, int, char *, int);
int be_change_grub_default(char *, char *);
char *be_auto_snap_name(void);
char *be_auto_be_name(char *);
char *be_auto_zone_be_name(char *, char *);
char *be_default_policy(void);
void be_print_err(char *, ...);
int errno_to_be_err(int);
/* be_activate.c */
int _be_activate(char *);
int be_activate_current_be(void);
/* be_zones.c */
void be_make_zoneroot(char *, char *, int);
int be_find_mounted_zone_root(char *, char *, char *, int);
char *be_get_default_isa(void);
#ifdef __cplusplus