#ifndef _ZONEADM_H
#define _ZONEADM_H
#include <sys/types.h>
#define CMD_HELP 0
#define CMD_BOOT 1
#define CMD_HALT 2
#define CMD_READY 3
#define CMD_SHUTDOWN 4
#define CMD_REBOOT 5
#define CMD_LIST 6
#define CMD_VERIFY 7
#define CMD_INSTALL 8
#define CMD_UNINSTALL 9
#define CMD_MOUNT 10
#define CMD_UNMOUNT 11
#define CMD_CLONE 12
#define CMD_MOVE 13
#define CMD_DETACH 14
#define CMD_ATTACH 15
#define CMD_MARK 16
#define CMD_APPLY 17
#define CMD_SYSBOOT 18
#define CMD_MIN CMD_HELP
#define CMD_MAX CMD_SYSBOOT
#if !defined(TEXT_DOMAIN)
#define TEXT_DOMAIN "SYS_TEST"
#endif
#define Z_ERR 1
#define Z_USAGE 2
#define Z_FATAL 3
#define SW_CMP_NONE 0x0
#define SW_CMP_SRC 0x01
#define SW_CMP_SILENT 0x02
typedef struct zone_mounts {
char *zonepath;
int zonepath_len;
int num_unexpected_mounts;
int num_root_overlay_mounts;
struct mnttab *root_mnttab;
} zone_mounts_t;
extern char *target_zone;
extern int zfm_print(const struct mnttab *mntp, void *unused);
extern int clone_copy(char *source_zonepath, char *zonepath);
extern char *cmd_to_str(int cmd_num);
extern int do_subproc(char *cmdbuf);
extern int subproc_status(const char *cmd, int status,
boolean_t verbose_failure);
extern void zerror(const char *fmt, ...);
extern void zperror(const char *str, boolean_t zonecfg_error);
extern void zperror2(const char *zone, const char *str);
extern int clone_snapshot_zfs(char *snap_name, char *zonepath,
char *validatesnap);
extern int clone_zfs(char *source_zonepath, char *zonepath, char *presnapbuf,
char *postsnapbuf);
extern void create_zfs_zonepath(char *zonepath);
extern int destroy_zfs(char *zonepath);
extern boolean_t is_zonepath_zfs(char *zonepath);
extern int move_zfs(char *zonepath, char *new_zonepath);
extern int verify_datasets(zone_dochandle_t handle);
extern int verify_fs_zfs(struct zone_fstab *fstab);
extern int zone_mounts_init(zone_mounts_t *mounts, const char *zonepath);
extern void zone_mounts_destroy(zone_mounts_t *mounts);
extern int zone_mount_rootfs(zone_mounts_t *mounts, const char *zonepath);
extern int zone_unmount_rootfs(zone_mounts_t *mounts, const char *zonepath,
boolean_t force);
extern int init_zfs(void);
#endif