installboot: remove installboot script from i386 platform
[unleashed.git] / usr / src / cmd / boot / installboot / installboot.h
blob2fa7ad2561e23ff5fb3f1a08d6d7321c7f0e4b90
1 /*
2 * CDDL HEADER START
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]
19 * CDDL HEADER END
22 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
26 #ifndef _INSTALLBOOT_H
27 #define _INSTALLBOOT_H
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
33 #include <sys/multiboot.h>
34 #include <sys/types.h>
36 enum ib_fs_types {
37 TARGET_IS_UFS = 0,
38 TARGET_IS_HSFS,
39 TARGET_IS_ZFS
42 typedef struct _ib_device {
43 char *path;
44 int fd;
45 uint8_t type;
46 } ib_device_t;
48 typedef struct _ib_bootblock {
49 char *buf;
50 char *file;
51 char *extra;
52 multiboot_header_t *mboot;
53 uint32_t mboot_off;
54 uint32_t buf_size;
55 uint32_t file_size;
56 uint32_t extra_size;
57 } ib_bootblock_t;
59 typedef struct _ib_data {
60 ib_device_t device;
61 ib_bootblock_t bootblock;
62 } ib_data_t;
64 #define is_zfs(type) (type == TARGET_IS_ZFS)
66 #define BBLK_DATA_RSVD_SIZE (15 * SECTOR_SIZE)
67 #define BBLK_ZFS_EXTRA_OFF (SECTOR_SIZE * 1024)
69 #ifdef __cplusplus
71 #endif
73 #endif /* _INSTALLBOOT_H */