From ad93cc00f172c17161e5b842efb060e90e190abd Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 18 Apr 2007 02:08:48 +0300 Subject: [PATCH] Fix sysfs resource file parsing. Signed-off-by: Michael S. Tsirkin --- mtcr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtcr.h b/mtcr.h index 107b768..9cf7cc9 100644 --- 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); -- 2.41.0