Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pcmcia In pcmcia_print_cis(): When printing io and m...



details:   https://anonhg.NetBSD.org/src/rev/eb7a8c4f88c1
branches:  trunk
changeset: 474545:eb7a8c4f88c1
user:      bad <bad%NetBSD.org@localhost>
date:      Sun Jul 11 00:26:29 1999 +0000

description:
In pcmcia_print_cis(): When printing io and mem spaces don't append trailing
0s if length or hostaddr are zero, instead DTRT.

diffstat:

 sys/dev/pcmcia/pcmcia_cis.c |  30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)

diffs (49 lines):

diff -r 5739b4bd3fb3 -r eb7a8c4f88c1 sys/dev/pcmcia/pcmcia_cis.c
--- a/sys/dev/pcmcia/pcmcia_cis.c       Sat Jul 10 23:07:15 1999 +0000
+++ b/sys/dev/pcmcia/pcmcia_cis.c       Sun Jul 11 00:26:29 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcmcia_cis.c,v 1.10 1998/12/29 09:03:15 marc Exp $     */
+/*     $NetBSD: pcmcia_cis.c,v 1.11 1999/07/11 00:26:29 bad Exp $      */
 
 #define        PCMCIACISDEBUG
 
@@ -541,24 +541,26 @@
                                printf("; iomask %lx, iospace", cfe->iomask);
 
                                for (i = 0; i < cfe->num_iospace; i++)
-                                       printf(" %lx%s%lx",
-                                           cfe->iospace[i].start,
-                                           cfe->iospace[i].length ? "-" : "",
-                                           cfe->iospace[i].start +
-                                             cfe->iospace[i].length - 1);
+                                       printf(" %lx",
+                                           cfe->iospace[i].start);
+                                       if (cfe->iospace[i].length)
+                                               printf("-%lx",
+                                                   cfe->iospace[i].start +
+                                                     cfe->iospace[i].length - 1);
                        }
                        if (cfe->num_memspace) {
                                printf("; memspace");
 
                                for (i = 0; i < cfe->num_memspace; i++)
-                                       printf(" %lx%s%lx%s%lx",
-                                           cfe->memspace[i].cardaddr,
-                                           cfe->memspace[i].length ? "-" : "",
-                                           cfe->memspace[i].cardaddr +
-                                             cfe->memspace[i].length - 1,
-                                           cfe->memspace[i].hostaddr ?
-                                             "@" : "",
-                                           cfe->memspace[i].hostaddr);
+                                       printf(" %lx",
+                                           cfe->memspace[i].cardaddr);
+                                       if (cfe->memspace[i].length)
+                                               printf("-%lx",
+                                                   cfe->memspace[i].cardaddr +
+                                                     cfe->memspace[i].length - 1);
+                                       if (cfe->memspace[i].hostaddr)
+                                               printf("@%lx",
+                                                   cfe->memspace[i].hostaddr);
                        }
                        if (cfe->maxtwins)
                                printf("; maxtwins %d", cfe->maxtwins);



Home | Main Index | Thread Index | Old Index