Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31151
b: refs/heads/master
c: 67a061a
h: refs/heads/master
i:
  31149: 45fec9f
  31147: f42df1d
  31143: ed09fe2
  31135: 26d7fb0
v: v3
  • Loading branch information
Kyle McMartin authored and Kyle McMartin committed Jun 27, 2006
1 parent fd31afe commit 4a13c4d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec1fdc24c2ae012b078ba0187ceef208e08a3aec
refs/heads/master: 67a061a191017f984a1ef0ff73ae988b9b15f6d3
14 changes: 2 additions & 12 deletions trunk/drivers/parisc/pdc_stable.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,22 +622,12 @@ static ssize_t
pdcs_osid_read(struct subsystem *entry, char *buf)
{
char *out = buf;
char *tmpstr = NULL;

if (!entry || !buf)
return -EINVAL;

switch (pdcs_osid) {
case 0x0000: tmpstr = "No OS"; break;
case 0x0001: tmpstr = "HP-UX"; break;
case 0x0002: tmpstr = "MPE-iX"; break;
case 0x0003: tmpstr = "OSF"; break;
case 0x0004: tmpstr = "HP-RT"; break;
case 0x0005: tmpstr = "Novell Netware"; break;
case 0x0006: tmpstr = "Linux"; break;
default: tmpstr = "Unknown"; break;
}
out += sprintf(out, "%s dependent data (0x%.4x)\n", tmpstr, pdcs_osid);
out += sprintf(out, "%s dependent data (0x%.4x)\n",
os_id_to_string(pdcs_osid), pdcs_osid);

return out - buf;
}
Expand Down
13 changes: 13 additions & 0 deletions trunk/include/asm-parisc/pdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4a13c4d

Please sign in to comment.