Print this page
*** NO COMMENTS ***


   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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  24  */
  25 
  26 /*
  27  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  28  */
  29 
  30 #ifndef _LIBBE_PRIV_H
  31 #define _LIBBE_PRIV_H
  32 
  33 #include <libnvpair.h>
  34 #include <libzfs.h>
  35 #include <instzones_api.h>
  36 
  37 #ifdef __cplusplus
  38 extern "C" {
  39 #endif
  40 
  41 #define ARCH_LENGTH             MAXNAMELEN
  42 #define BE_AUTO_NAME_MAX_TRY    3
  43 #define BE_AUTO_NAME_DELIM      '-'
  44 #define BE_DEFAULTS             "/etc/default/be"
  45 #define BE_DFLT_BENAME_STARTS   "BENAME_STARTS_WITH="
  46 #define BE_CONTAINER_DS_NAME    "ROOT"
  47 #define BE_DEFAULT_CONSOLE      "text"


 188 boolean_t valid_be_policy(char *);
 189 boolean_t be_valid_auto_snap_name(char *);
 190 boolean_t be_valid_be_name(const char *);
 191 void be_print_err(char *, ...);
 192 int be_find_current_be(be_transaction_data_t *);
 193 int zfs_err_to_be_err(libzfs_handle_t *);
 194 int errno_to_be_err(int);
 195 
 196 /* be_activate.c */
 197 int _be_activate(char *);
 198 int be_activate_current_be(void);
 199 boolean_t be_is_active_on_boot(char *);
 200 
 201 /* be_zones.c */
 202 void be_make_zoneroot(char *, char *, int);
 203 int be_find_active_zone_root(zfs_handle_t *, char *, char *, int);
 204 int be_find_mounted_zone_root(char *, char *, char *, int);
 205 boolean_t be_zone_supported(char *);
 206 zoneBrandList_t *be_get_supported_brandlist(void);
 207 int be_zone_get_parent_uuid(const char *, uuid_t *);


 208 
 209 /* check architecture functions */
 210 char *be_get_default_isa(void);
 211 boolean_t be_is_isa(char *);
 212 boolean_t be_has_grub(void);
 213 
 214 /* callback functions */
 215 int be_exists_callback(zpool_handle_t *, void *);
 216 int be_find_zpool_callback(zpool_handle_t *, void *);
 217 int be_zpool_find_current_be_callback(zpool_handle_t *, void *);
 218 int be_zfs_find_current_be_callback(zfs_handle_t *, void *);
 219 int be_check_be_roots_callback(zpool_handle_t *, void *);
 220 
 221 /* defaults */
 222 void be_get_defaults(struct be_defaults *defaults);
 223 
 224 #ifdef __cplusplus
 225 }
 226 #endif
 227 


   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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  24  */
  25 
  26 /*
  27  * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  28  */
  29 
  30 #ifndef _LIBBE_PRIV_H
  31 #define _LIBBE_PRIV_H
  32 
  33 #include <libnvpair.h>
  34 #include <libzfs.h>
  35 #include <instzones_api.h>
  36 
  37 #ifdef __cplusplus
  38 extern "C" {
  39 #endif
  40 
  41 #define ARCH_LENGTH             MAXNAMELEN
  42 #define BE_AUTO_NAME_MAX_TRY    3
  43 #define BE_AUTO_NAME_DELIM      '-'
  44 #define BE_DEFAULTS             "/etc/default/be"
  45 #define BE_DFLT_BENAME_STARTS   "BENAME_STARTS_WITH="
  46 #define BE_CONTAINER_DS_NAME    "ROOT"
  47 #define BE_DEFAULT_CONSOLE      "text"


 188 boolean_t valid_be_policy(char *);
 189 boolean_t be_valid_auto_snap_name(char *);
 190 boolean_t be_valid_be_name(const char *);
 191 void be_print_err(char *, ...);
 192 int be_find_current_be(be_transaction_data_t *);
 193 int zfs_err_to_be_err(libzfs_handle_t *);
 194 int errno_to_be_err(int);
 195 
 196 /* be_activate.c */
 197 int _be_activate(char *);
 198 int be_activate_current_be(void);
 199 boolean_t be_is_active_on_boot(char *);
 200 
 201 /* be_zones.c */
 202 void be_make_zoneroot(char *, char *, int);
 203 int be_find_active_zone_root(zfs_handle_t *, char *, char *, int);
 204 int be_find_mounted_zone_root(char *, char *, char *, int);
 205 boolean_t be_zone_supported(char *);
 206 zoneBrandList_t *be_get_supported_brandlist(void);
 207 int be_zone_get_parent_uuid(const char *, uuid_t *);
 208 int be_zone_set_parent_uuid(char *, uuid_t);
 209 boolean_t be_zone_compare_uuids(char *);
 210 
 211 /* check architecture functions */
 212 char *be_get_default_isa(void);
 213 boolean_t be_is_isa(char *);
 214 boolean_t be_has_grub(void);
 215 
 216 /* callback functions */
 217 int be_exists_callback(zpool_handle_t *, void *);
 218 int be_find_zpool_callback(zpool_handle_t *, void *);
 219 int be_zpool_find_current_be_callback(zpool_handle_t *, void *);
 220 int be_zfs_find_current_be_callback(zfs_handle_t *, void *);
 221 int be_check_be_roots_callback(zpool_handle_t *, void *);
 222 
 223 /* defaults */
 224 void be_get_defaults(struct be_defaults *defaults);
 225 
 226 #ifdef __cplusplus
 227 }
 228 #endif
 229