1 /* ----------------------------------------------------------------------- *
3 * Pportions of this file taken from the dmidecode project
5 * Copyright (C) 2000-2002 Alan Cox <alan@redhat.com>
6 * Copyright (C) 2002-2008 Jean Delvare <khali@linux-fr.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * For the avoidance of doubt the "preferred form" of this code is one which
23 * is in an open unpatent encumbered format. Where cryptographic key signing
24 * forms part of the process of creating an executable the information
25 * including keys needed to generate an equivalently functional executable
26 * are deemed to be part of the source code.
32 const char *dmi_chassis_type(uint8_t code
)
35 static const char *type
[] = {
39 "Low Profile Desktop",
52 "Main Server Chassis", /* master.mif says System */
55 "Bus Expansion Chassis",
60 "Multi-system", /* 0x19 */
64 "Blade Enclosing" /* 0x1D */
67 if (code
>= 0x01 && code
<= 0x1D)
68 return type
[code
- 0x01];
72 const char *dmi_chassis_lock(uint8_t code
)
74 static const char *lock
[] = {
75 "Not Present", /* 0x00 */
82 const char *dmi_chassis_state(uint8_t code
)
85 static const char *state
[] = {
88 "Safe", /* master.mif says OK */
91 "Non-recoverable" /* 0x06 */
94 if (code
>= 0x01 && code
<= 0x06)
95 return (state
[code
- 0x01]);
99 const char *dmi_chassis_security_status(uint8_t code
)
102 static const char *status
[] = {
106 "External Interface Locked Out",
107 "External Interface Enabled" /* 0x05 */
110 if (code
>= 0x01 && code
<= 0x05)
111 return (status
[code
- 0x01]);