summaryrefslogtreecommitdiff
path: root/include/asm-parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@parisc-linux.org>2006-06-25 20:58:57 +0400
committerKyle McMartin <kyle@hera.kernel.org>2006-06-28 03:28:43 +0400
commit67a061a191017f984a1ef0ff73ae988b9b15f6d3 (patch)
treef7f84d047dbeafe40711386bd6a8a4ae50bd80de /include/asm-parisc
parentec1fdc24c2ae012b078ba0187ceef208e08a3aec (diff)
downloadlinux-67a061a191017f984a1ef0ff73ae988b9b15f6d3.tar.xz
[PARISC] Add os_id_to_string helper
Add a helper to asm/pdc.h to translate OS_ID values to strings and use it in the pdc_stable driver. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'include/asm-parisc')
-rw-r--r--include/asm-parisc/pdc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h
index 33bff615d6e1..7a21f106ade6 100644
--- a/include/asm-parisc/pdc.h
+++ b/include/asm-parisc/pdc.h
@@ -284,6 +284,19 @@ typedef struct {
#define OS_ID_NOVEL 5 /* NOVELL OS */
#define OS_ID_LINUX 6 /* Linux */
+static inline char * os_id_to_string(u16 os_id) {
+ switch(os_id) {
+ case OS_ID_NONE: return "No OS";
+ case OS_ID_HPUX: return "HP-UX";
+ case OS_ID_MPEXL: return "MPE-iX";
+ case OS_ID_OSF: return "OSF";
+ case OS_ID_HPRT: return "HP-RT";
+ case OS_ID_NOVEL: return "Novell Netware";
+ case OS_ID_LINUX: return "Linux";
+ default: return "Unknown";
+ }
+}
+
/* constants for PDC_CHASSIS */
#define OSTAT_OFF 0