From: Dmitry V. Levin Date: Thu, 28 Apr 2016 21:10:59 +0000 (+0000) Subject: tests/remap_file_pages.c: fix for the upcoming change of xlat.val type X-Git-Tag: v4.12~244 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=909e664a2e2c89a5a7aac7c19c7a8124700f1faa;p=strace tests/remap_file_pages.c: fix for the upcoming change of xlat.val type The "flags" argument of remap_file_page syscall has type "unsigned long", so it is not correct to load most significant bits with garbage ans assume they are going to be ignored. * tests/remap_file_pages.c (main): Remove artificial garbage from flags. --- diff --git a/tests/remap_file_pages.c b/tests/remap_file_pages.c index 3714a17a..8626e7f0 100644 --- a/tests/remap_file_pages.c +++ b/tests/remap_file_pages.c @@ -44,8 +44,7 @@ main(void) const unsigned long prot = (unsigned long) 0xacedcafe00000000 | PROT_READ|PROT_WRITE|PROT_EXEC; const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deed; - const unsigned long flags = (unsigned long) 0xbadc0ded00000000 - | MAP_PRIVATE|MAP_ANONYMOUS; + const unsigned long flags = MAP_PRIVATE|MAP_ANONYMOUS; long rc = syscall(__NR_remap_file_pages, addr, size, prot, pgoff, flags); printf("remap_file_pages(%#lx, %lu, %s, %lu, %s) = %ld %s (%m)\n",