2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000 BSDi
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * Status codes for block read/write commands, etc.
33 * XXX many of these would not normally be returned, as they are
34 * relevant only to FSA operations.
36 static struct aac_code_lookup aac_command_status_table[] = {
38 {"operation not permitted", 1},
41 {"device not configured", 6},
43 {"permission denoed", 13},
45 {"cross-device link", 18},
46 {"operation not supported by device", 19},
47 {"not a directory", 20},
48 {"is a directory", 21},
49 {"invalid argument", 22},
50 {"file too large", 27},
51 {"no space on device", 28},
52 {"readonly filesystem", 30},
53 {"too many links", 31},
54 {"operation would block", 35},
55 {"file name too long", 63},
56 {"directory not empty", 66},
57 {"quota exceeded", 69},
58 {"stale file handle", 70},
59 {"too many levels of remote in path", 71},
60 {"bad file handle", 10001},
62 {"bad cookie", 10003},
63 {"operation not supported", 10004},
65 {"server fault", 10006},
68 {"not mounted", 10009},
69 {"in maintenace mode", 10010},
72 {"unknown command status", 0}
75 #define AAC_COMMAND_STATUS(x) aac_describe_code(aac_command_status_table, x)
77 static struct aac_code_lookup aac_cpu_variant[] = {
78 {"i960JX", CPUI960_JX},
79 {"i960CX", CPUI960_CX},
80 {"i960HX", CPUI960_HX},
81 {"i960RX", CPUI960_RX},
82 {"StrongARM SA110", CPUARM_SA110},
83 {"MPC824x", CPUMPC_824x},
84 {"Unknown StrongARM", CPUARM_xxx},
85 {"Unknown PowerPC", CPUPPC_xxx},
87 {"Unknown processor", 0}
90 static struct aac_code_lookup aac_battery_platform[] = {
91 {"required battery present", PLATFORM_BAT_REQ_PRESENT},
92 {"REQUIRED BATTERY NOT PRESENT", PLATFORM_BAT_REQ_NOTPRESENT},
93 {"optional battery present", PLATFORM_BAT_OPT_PRESENT},
94 {"optional battery not installed", PLATFORM_BAT_OPT_NOTPRESENT},
95 {"no battery support", PLATFORM_BAT_NOT_SUPPORTED},
97 {"unknown battery platform", 0}
100 static struct aac_code_lookup aac_container_types[] = {
101 {"Volume", CT_VOLUME},
102 {"RAID 1 (Mirror)", CT_MIRROR},
103 {"RAID 0 (Stripe)", CT_STRIPE},
104 {"RAID 5", CT_RAID5},
108 {"Passthrough", CT_PASSTHRU},
109 {"RAID 4", CT_RAID4},
110 {"RAID 0/1", CT_RAID10},
111 {"RAID 0/0", CT_RAID00},
112 {"Volume of Mirrors", CT_VOLUME_OF_MIRRORS},
113 {"Pseudo RAID 3", CT_PSEUDO_RAID3},
114 {"RAID 0/5", CT_RAID50},