Home | History | Annotate | Line # | Download | only in ic
aac_tables.h revision 1.1
      1 /*	$NetBSD: aac_tables.h,v 1.1 2002/04/26 02:06:16 ad Exp $	*/
      2 
      3 /*-
      4  * Copyright (c) 2000 Michael Smith
      5  * Copyright (c) 2000 BSDi
      6  * Copyright (c) 2000 Niklas Hallqvist
      7  * All rights reserved.
      8  *
      9  * Redistribution and use in source and binary forms, with or without
     10  * modification, are permitted provided that the following conditions
     11  * are met:
     12  * 1. Redistributions of source code must retain the above copyright
     13  *    notice, this list of conditions and the following disclaimer.
     14  * 2. Redistributions in binary form must reproduce the above copyright
     15  *    notice, this list of conditions and the following disclaimer in the
     16  *    documentation and/or other materials provided with the distribution.
     17  *
     18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     19  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     23  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     24  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     25  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     26  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     27  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     28  * SUCH DAMAGE.
     29  *
     30  * from FreeBSD: aac_tables.h,v 1.1 2000/09/13 03:20:34 msmith Exp
     31  * via OpenBSD: aac_tables.h,v 1.1 2000/11/10 09:39:35 niklas Exp
     32  */
     33 
     34 /*
     35  * Status codes for block read/write commands, etc.
     36  *
     37  * XXX Many of these would not normally be returned, as they are relevant
     38  * only to FSA operations.
     39  */
     40 const struct aac_code_lookup aac_command_status_table[] = {
     41 	{ "OK",					0 },
     42 	{ "operation not permitted",		1 },
     43 	{ "not found",				2 },
     44 	{ "I/O error",				5 },
     45 	{ "device not configured",		6 },
     46 	{ "too big",				7 },
     47 	{ "permission denied",			13 },
     48 	{ "file exists",			17 },
     49 	{ "cross-device link",			18 },
     50 	{ "operation not supported by device",	19 },
     51 	{ "not a directory",			20 },
     52 	{ "is a directory",			21 },
     53 	{ "invalid argument",			22 },
     54 	{ "file too large",			27 },
     55 	{ "no space on device",			28 },
     56 	{ "readonly filesystem",		30 },
     57 	{ "too many links",			31 },
     58 	{ "operation would block",		35 },
     59 	{ "file name too long",			63 },
     60 	{ "directory not empty",		66 },
     61 	{ "quota exceeded",			69 },
     62 	{ "stale file handle",			70 },
     63 	{ "too many levels of remote in path",	71 },
     64 	{ "bad file handle",			10001 },
     65 	{ "not sync",				10002 },
     66 	{ "bad cookie",				10003 },
     67 	{ "operation not supported",		10004 },
     68 	{ "too small",				10005 },
     69 	{ "server fault",			10006 },
     70 	{ "bad type",				10007 },
     71 	{ "jukebox",				10008 },
     72 	{ "not mounted",			10009 },
     73 	{ "in maintenace mode",			10010 },
     74 	{ "stale ACL",				10011 },
     75 	{ NULL, 				0 },
     76 	{ "unknown command status",		0 }
     77 };
     78 
     79 #define AAC_COMMAND_STATUS(x)	aac_describe_code(aac_command_status_table, x)
     80 
     81 const struct aac_code_lookup aac_cpu_variant[] = {
     82 	{ "i960JX",			CPUI960_JX },
     83 	{ "i960CX",			CPUI960_CX },
     84 	{ "i960HX",			CPUI960_HX },
     85 	{ "i960RX",			CPUI960_RX },
     86 	{ "StrongARM SA110",		CPUARM_SA110 },
     87 	{ "PowerPC 603e",		CPUPPC_603e },
     88 	{ "Unknown StrongARM",		CPUARM_xxx },
     89 	{ "Unknown PowerPC",		CPUPPC_xxx },
     90 	{ NULL, 			0 },
     91 	{ "Unknown processor",		0 }
     92 };
     93 
     94 const struct aac_code_lookup aac_battery_platform[] = {
     95 	{ "required battery present",		PLATFORM_BAT_REQ_PRESENT },
     96 	{ "REQUIRED BATTERY NOT PRESENT",	PLATFORM_BAT_REQ_NOTPRESENT },
     97 	{ "optional battery present",		PLATFORM_BAT_OPT_PRESENT },
     98 	{ "optional battery not installed",	PLATFORM_BAT_OPT_NOTPRESENT },
     99 	{ "no battery support",			PLATFORM_BAT_NOT_SUPPORTED },
    100 	{ NULL,					0 },
    101 	{ "unknown battery platform",		0 }
    102 };
    103 
    104 const struct aac_code_lookup aac_container_types[] = {
    105 	{ "Volume",		CT_VOLUME },
    106 	{ "RAID 1 (Mirror)",	CT_MIRROR },
    107 	{ "RAID 0 (Stripe)",	CT_STRIPE },
    108 	{ "RAID 5",		CT_RAID5 },
    109 	{ "SSRW",		CT_SSRW },
    110 	{ "SSRO",		CT_SSRO },
    111 	{ "Morph",		CT_MORPH },
    112 	{ "Passthrough",	CT_PASSTHRU },
    113 	{ "RAID 4",		CT_RAID4 },
    114 	{ "RAID 10",		CT_RAID10 },
    115 	{ "RAID 00",		CT_RAID00 },
    116 	{ "Volume of Mirrors",	CT_VOLUME_OF_MIRRORS },
    117 	{ "Pseudo RAID 3",	CT_PSEUDO_RAID3 },
    118 	{ NULL,			0 },
    119 	{ "unknown",		0 }
    120 };
    121