/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _GLOBAL_H
#define _GLOBAL_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions for Label types: L_TYPE_SOLORIS is the default Sun label
* a.k.a VTOC. L_TYPE_EFI is the EFI label type.
*/
#define L_TYPE_SOLARIS 0
#ifndef UINT_MAX64
#endif
#ifndef UINT_MAX32
#endif
#if !defined(_EXTVTOC)
#endif
/*
* This file contains global definitions and declarations. It is intended
* to be included by everyone.
*/
#include <stdio.h>
#include <assert.h>
#include <memory.h>
#include <unistd.h>
#include <ctype.h>
#include <sys/isa_defs.h>
#include "hardware_structs.h"
#include "defect.h"
#include "io.h"
/*
* These declarations are global state variables.
*/
/* for useful error messages */
/* commands */
/* commands */
/*
* These declarations are used for quick access to information about
* the disk being worked on.
*/
/* for non-fdisk machines. */
#if defined(_SUNOS_VTOC_16)
#endif /* defined(_SUNOS_VTOC_16) */
/* information accesses */
/*
* These defines are used to manipulate the physical characteristics of
* the current disk.
*/
/*
* Macro to convert a device number into a partition number
*/
/*
* These values define flags for the current disk (cur_flags).
*/
/*
* These flags are for the controller type flags field.
*/
/*
* This flag has been introduced only for SPARC ATA. Which has been approved
* at that time with the agreement in the next fix it will be removed and the
* format will be revamped with controller Ops structure not to have
* any operation to be NULL. As it makes things more modular.
*
* This flag is also used for PCMCIA pcata driver.
* The flag prevents reading or writing a defect list on the disk
* testing and console error reporting still work normally.
* and have not allocated any space for alternate cylinders to keep
* the bab block lists.
*/
/*
* Do not require confirmation to extract defect lists on SCSI
* and IPI drives, since this operation is instantaneous
*/
/*
* Macros to make life easier
*/
/*
* These flags are for the disk type flags field.
*/
/*
* These defines are used to access the ctlr specific
* disk type fields (based on ctlr flags).
*/
/*
* These flags are for the disk info flags field.
*/
/* labeled yet. */
/* currently formatting */
/*
* These flags are used to control disk command execution.
*/
/*
* Directional parameter for the op_rdwr controller op.
*/
#define DIR_READ 0
/*
* These defines are the mode parameter for the checksum routines.
*/
/*
* This is the base character for partition identifiers
*/
/*
* Base pathname for devfs names to be stripped from physical name.
*/
/*
* Protection type by SCSI-3
*/
#define PROT_TYPE_0 0
/*
* Function prototypes ... Both for ANSI and non-ANSI C compilers
*/
#ifdef __STDC__
int copy_solaris_part(struct ipart *);
int good_fdisk(void);
int fdisk_physical_name(char *);
#else /* __STDC__ */
int copy_solaris_part();
int good_fdisk();
int fdisk_physical_name();
#endif /* __STDC__ */
#ifdef __cplusplus
}
#endif
#endif /* _GLOBAL_H */