PATCH: /dev/nvram cleanups.

Jones D (djones2@glam.ac.uk)
Wed, 21 Jul 1999 18:05:21 +0100


Some small bits for the nvram driver. An extraneous leading space
removed from the /proc/nvram output, and addition of the 2.88M
recognition.

regards,

Dave.

diff -urN linux/drivers/char/nvram.c linux.dj/drivers/char/nvram.c
--- linux/drivers/char/nvram.c Mon Aug 24 21:14:09 1998
+++ linux.dj/drivers/char/nvram.c Wed Mar 24 22:20:08 1999
@@ -479,7 +479,7 @@
#ifdef CONFIG_PROC_FS

static char *floppy_types[] = {
- "none", "5.25'' 360k", "5.25'' 1.2M", "3.5'' 720k", "3.5'' 1.44M"
+ "none", "5.25'' 360k", "5.25'' 1.2M", "3.5'' 720k", "3.5'' 1.44M",
"3.5'' 2.88M"
};

static char *gfx_types[] = {
@@ -521,14 +521,14 @@
PRINT_PROC( "HD 0 type : " );
type = nvram[4] >> 4;
if (type)
- PRINT_PROC( " %02x\n", type == 0x0f ? nvram[11] : type );
+ PRINT_PROC( "%02x\n", type == 0x0f ? nvram[11] : type );
else
PRINT_PROC( "none\n" );

PRINT_PROC( "HD 1 type : " );
type = nvram[4] & 0x0f;
if (type)
- PRINT_PROC( " %02x\n", type == 0x0f ? nvram[12] : type );
+ PRINT_PROC( "%02x\n", type == 0x0f ? nvram[12] : type );
else
PRINT_PROC( "none\n" );

@@ -644,7 +644,7 @@
if (i < 0)
PRINT_PROC( "0x%02x (undefined)\n", nvram[1] );

- PRINT_PROC( "SCSI arbitration : %s\n", (nvram[16] & 0x80) ? "on" :
"off" );
+ PRINT_PROC( "SCSI arbitration : o%s\n", (nvram[16] & 0x80) ? "n" :
"ff" );
PRINT_PROC( "SCSI host ID : " );
if (nvram[16] & 0x80)
PRINT_PROC( "%d\n", nvram[16] & 7 );

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/