From adc7a4e678dbf44c983325c15ddb8b7082d9db26 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 14 Jul 1996 05:28:09 +0000 Subject: [PATCH] Fri Jul 5 18:44:55 1996 David Mosberger-Tang * sysdeps/unix/sysv/linux/alpha/ioperm.c (port_to_cpu_addr): Size shift amount for Jensen must be 5 not 4. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index b9630a8273..cee5f482bb 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -116,13 +116,9 @@ static inline unsigned long port_to_cpu_addr (unsigned long port, int iosys, int size) { if (iosys == IOSYS_JENSEN) - { - return (port << 7) + ((size - 1) << 4) + io.base; - } + return (port << 7) + ((size - 1) << 5) + io.base; else - { - return (port << 5) + ((size - 1) << 3) + io.base; - } + return (port << 5) + ((size - 1) << 3) + io.base; } @@ -303,17 +299,18 @@ init_iosys (void) } else { - char name[256]; FILE * fp; fp = fopen (PATH_CPUINFO, "r"); if (!fp) return -1; - while ((n = fscanf (fp, "%256[^:]: %256[^\n]\n", name, systype)) != EOF) + while ((n = fscanf (fp, "system type : %256[^\n]\n", systype)) + != EOF) { - if (n == 2 && strncmp (name, "system type", 11) == 0) { + if (n == 1) break; - } + else + fgets (systype, 256, fp); } fclose(fp);