Patch: kernel/resource.c: select format string inteligently

Russell King (rmk@arm.linux.org.uk)
Tue, 14 Dec 1999 00:32:01 +0000 (GMT)


Hi Linus & world,

The following patch allows inteligent selection of the "short" form of
the format string in causes where there are only 64K ports, and the
"long" form elsewhere.

Any comments?

diff -urN linux-orig/kernel/resource.c linux/kernel/resource.c
--- linux-orig/kernel/resource.c Tue Dec 7 19:56:16 1999
+++ linux/kernel/resource.c Tue Dec 7 20:11:56 1999
@@ -55,7 +55,7 @@
int retval;

fmt = " %08lx-%08lx : %s\n";
- if (root == &ioport_resource)
+ if (root->end < 0x10000)
fmt = " %04lx-%04lx : %s\n";
read_lock(&resource_lock);
retval = do_resource_list(root->child, fmt, 8, buf, buf + size) - buf;

_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |

-
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/