1*184cd04cScth /* 2*184cd04cScth * CDDL HEADER START 3*184cd04cScth * 4*184cd04cScth * The contents of this file are subject to the terms of the 5*184cd04cScth * Common Development and Distribution License (the "License"). 6*184cd04cScth * You may not use this file except in compliance with the License. 7*184cd04cScth * 8*184cd04cScth * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*184cd04cScth * or http://www.opensolaris.org/os/licensing. 10*184cd04cScth * See the License for the specific language governing permissions 11*184cd04cScth * and limitations under the License. 12*184cd04cScth * 13*184cd04cScth * When distributing Covered Code, include this CDDL HEADER in each 14*184cd04cScth * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*184cd04cScth * If applicable, add the following below this CDDL HEADER, with the 16*184cd04cScth * fields enclosed by brackets "[]" replaced with your own identifying 17*184cd04cScth * information: Portions Copyright [yyyy] [name of copyright owner] 18*184cd04cScth * 19*184cd04cScth * CDDL HEADER END 20*184cd04cScth */ 21*184cd04cScth 22*184cd04cScth /* 23*184cd04cScth * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24*184cd04cScth * Use is subject to license terms. 25*184cd04cScth */ 26*184cd04cScth 27*184cd04cScth #ifndef _DM_TYPES_H 28*184cd04cScth #define _DM_TYPES_H 29*184cd04cScth 30*184cd04cScth /* 31*184cd04cScth * Common types for the disk monitor 32*184cd04cScth */ 33*184cd04cScth 34*184cd04cScth #ifdef __cplusplus 35*184cd04cScth extern "C" { 36*184cd04cScth #endif 37*184cd04cScth 38*184cd04cScth #include <sys/types.h> 39*184cd04cScth 40*184cd04cScth #define NSEC_PER_POLL_POSITION 250000000UL /* 0.25 of a second */ 41*184cd04cScth 42*184cd04cScth typedef enum { 43*184cd04cScth HPS_UNKNOWN = 0x0000, 44*184cd04cScth HPS_ABSENT = 0x0001, 45*184cd04cScth HPS_PRESENT = 0x0002, 46*184cd04cScth HPS_UNCONFIGURED = 0x0003, 47*184cd04cScth HPS_CONFIGURED = 0x0004, 48*184cd04cScth HPS_FAULTED = 0x1000, /* This state can be OR'ed in */ 49*184cd04cScth HPS_REPAIRED = 0x2000 50*184cd04cScth } hotplug_state_t; 51*184cd04cScth 52*184cd04cScth typedef struct { 53*184cd04cScth /* 54*184cd04cScth * Each field is the size of the corresponding field in the scsi 55*184cd04cScth * inquiry structure + 1 byte for the terminating NUL. 56*184cd04cScth */ 57*184cd04cScth char manuf[9]; /* 8 characters */ 58*184cd04cScth char model[33]; /* 32 characters to fo ATA ident$ */ 59*184cd04cScth char rev[9]; /* 8 characters */ 60*184cd04cScth /* 61*184cd04cScth * SCSI Serial number is 12 bytes from the main INQUIRY 62*184cd04cScth * page, but it may be longer in the Unit Serial Number 63*184cd04cScth * VPD page, so save space for up to 20 bytes of it (ATA 64*184cd04cScth * serial numbers may be up to 20-bytes long). 65*184cd04cScth */ 66*184cd04cScth char serial[21]; 67*184cd04cScth uint64_t size_in_bytes; 68*184cd04cScth } dm_fru_t; 69*184cd04cScth 70*184cd04cScth #ifdef __cplusplus 71*184cd04cScth } 72*184cd04cScth #endif 73*184cd04cScth 74*184cd04cScth #endif /* _DM_TYPES_H */ 75