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.
This commit is contained in:
Дмитрий Левин 2016-04-28 21:10:59 +00:00
parent 00beed61a4
commit 909e664a2e

View File

@ -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",