]> git.openfabrics.org - ~adrianc/mstflint.git/commitdiff
Fix sysfs resource file parsing.
authorMichael S. Tsirkin <mst@mellanox.co.il>
Tue, 17 Apr 2007 23:08:48 +0000 (02:08 +0300)
committerMichael S. Tsirkin <mst@mellanox.co.il>
Tue, 17 Apr 2007 23:08:48 +0000 (02:08 +0300)
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
mtcr.h

diff --git a/mtcr.h b/mtcr.h
index 107b768a692004700515118684b3c73807fd450c..9cf7cc928a6bb833098a40a79f7fafe9350e738c 100644 (file)
--- a/mtcr.h
+++ b/mtcr.h
@@ -345,8 +345,8 @@ unsigned long long mtcr_sysfs_get_offset(unsigned domain, unsigned bus,
        if (!f)
                return offset;
 
-       cnt = fscanf(f, "0x%llx0x%llx0x%llx", &start, &end, &type);
-       if (end != start + 0x100000 - 1) {
+       cnt = fscanf(f, "0x%llx 0x%llx 0x%llx", &start, &end, &type);
+       if (cnt != 3 || end != start + 0x100000 - 1) {
                if (0) fprintf(stderr,"proc: unexpected region size values: "
                        "cnt=%d, start=%#llx, end=%#llx\n",
                        cnt, start, end);