1*12947SEnrico.Perla@Sun.COM /* 2*12947SEnrico.Perla@Sun.COM * CDDL HEADER START 3*12947SEnrico.Perla@Sun.COM * 4*12947SEnrico.Perla@Sun.COM * The contents of this file are subject to the terms of the 5*12947SEnrico.Perla@Sun.COM * Common Development and Distribution License (the "License"). 6*12947SEnrico.Perla@Sun.COM * You may not use this file except in compliance with the License. 7*12947SEnrico.Perla@Sun.COM * 8*12947SEnrico.Perla@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*12947SEnrico.Perla@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*12947SEnrico.Perla@Sun.COM * See the License for the specific language governing permissions 11*12947SEnrico.Perla@Sun.COM * and limitations under the License. 12*12947SEnrico.Perla@Sun.COM * 13*12947SEnrico.Perla@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*12947SEnrico.Perla@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*12947SEnrico.Perla@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*12947SEnrico.Perla@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*12947SEnrico.Perla@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*12947SEnrico.Perla@Sun.COM * 19*12947SEnrico.Perla@Sun.COM * CDDL HEADER END 20*12947SEnrico.Perla@Sun.COM */ 21*12947SEnrico.Perla@Sun.COM /* 22*12947SEnrico.Perla@Sun.COM * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 23*12947SEnrico.Perla@Sun.COM */ 24*12947SEnrico.Perla@Sun.COM 25*12947SEnrico.Perla@Sun.COM #ifndef _BOOT_UTILS_H 26*12947SEnrico.Perla@Sun.COM #define _BOOT_UTILS_H 27*12947SEnrico.Perla@Sun.COM 28*12947SEnrico.Perla@Sun.COM #ifdef __cplusplus 29*12947SEnrico.Perla@Sun.COM extern "C" { 30*12947SEnrico.Perla@Sun.COM #endif 31*12947SEnrico.Perla@Sun.COM 32*12947SEnrico.Perla@Sun.COM #include <stdarg.h> 33*12947SEnrico.Perla@Sun.COM #include <sys/types.h> 34*12947SEnrico.Perla@Sun.COM #include "bblk_einfo.h" 35*12947SEnrico.Perla@Sun.COM 36*12947SEnrico.Perla@Sun.COM /* Common return values for various operations. */ 37*12947SEnrico.Perla@Sun.COM #define BC_SUCCESS (0) 38*12947SEnrico.Perla@Sun.COM #define BC_ERROR (1) 39*12947SEnrico.Perla@Sun.COM #define BC_NOUPDT (4) 40*12947SEnrico.Perla@Sun.COM #define BC_NOEXTRA (5) 41*12947SEnrico.Perla@Sun.COM #define BC_NOEINFO (6) 42*12947SEnrico.Perla@Sun.COM 43*12947SEnrico.Perla@Sun.COM #define SECTOR_SIZE (512) 44*12947SEnrico.Perla@Sun.COM 45*12947SEnrico.Perla@Sun.COM extern boolean_t boot_debug; 46*12947SEnrico.Perla@Sun.COM extern boolean_t nowrite; 47*12947SEnrico.Perla@Sun.COM 48*12947SEnrico.Perla@Sun.COM #define BOOT_DEBUG(...) boot_gdebug(__func__, __VA_ARGS__) 49*12947SEnrico.Perla@Sun.COM 50*12947SEnrico.Perla@Sun.COM void boot_gdebug(const char *, char *, ...); 51*12947SEnrico.Perla@Sun.COM 52*12947SEnrico.Perla@Sun.COM int write_out(int, void *, size_t, off_t); 53*12947SEnrico.Perla@Sun.COM int read_in(int, void *, size_t, off_t); 54*12947SEnrico.Perla@Sun.COM 55*12947SEnrico.Perla@Sun.COM #ifdef __cplusplus 56*12947SEnrico.Perla@Sun.COM } 57*12947SEnrico.Perla@Sun.COM #endif 58*12947SEnrico.Perla@Sun.COM 59*12947SEnrico.Perla@Sun.COM #endif /* _BOOT_UTILS_H */ 60