Signed-off-by: Tomasz Nowicki tomasz.nowicki@linaro.org --- scripts/mab/mab.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/scripts/mab/mab.c b/scripts/mab/mab.c index c9af2a5..d7356c7 100644 --- a/scripts/mab/mab.c +++ b/scripts/mab/mab.c @@ -49,7 +49,18 @@ int get_file_size(char *fname) err = stat(fname, &buf); if (err) printf("? cannot stat %s (%d)\n", fname, err); +#if 0 return (err == 0 ? buf.st_size : 0); +#else + /* + * XXX: Workaround for ACPI table mapping failure across page size + * boundary. Such case should be managed by kernel so this hack would + * not be necessary any more. We round up table to page size here + * reaching appropriate alignment. + */ +#define PAGE_SIZE 0x1000 + return (err == 0 ? PAGE_SIZE : 0); +#endif }
int valid_sig(char *sig)