summaryrefslogtreecommitdiff
path: root/tools/vm
diff options
context:
space:
mode:
authorNaoya Horiguchi <naoya.horiguchi@nec.com>2021-11-05 13:43:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-11-06 13:30:40 -0700
commit41d4613b378cc10c087d8af621ace891d96d0907 (patch)
tree80adbb0e4375d6773ac0ca422cd0da5db1435023 /tools/vm
parentb76901db7b3d28a1ca6f8690642187c56cb50018 (diff)
tools/vm/page-types.c: print file offset in hexadecimal
In page list mode (with -l and -L option), virtual address and physical address are printed in hexadecimal, but file offset is not, which is confusing, so let's align it. Link: https://lkml.kernel.org/r/20211004061325.1525902-4-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com> Cc: Bin Wang <wangbin224@huawei.com> Cc: Changbin Du <changbin.du@intel.com> Cc: Christian Hansen <chansen3@cisco.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/vm')
-rw-r--r--tools/vm/page-types.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/vm/page-types.c b/tools/vm/page-types.c
index fdb1891faf90..b1ed76d9a979 100644
--- a/tools/vm/page-types.c
+++ b/tools/vm/page-types.c
@@ -390,7 +390,7 @@ static void show_page_range(unsigned long voffset, unsigned long offset,
if (opt_pid)
printf("%lx\t", voff);
if (opt_file)
- printf("%lu\t", voff);
+ printf("%lx\t", voff);
if (opt_list_cgroup)
printf("@%llu\t", (unsigned long long)cgroup0);
if (opt_list_mapcnt)
@@ -418,7 +418,7 @@ static void show_page(unsigned long voffset, unsigned long offset,
if (opt_pid)
printf("%lx\t", voffset);
if (opt_file)
- printf("%lu\t", voffset);
+ printf("%lx\t", voffset);
if (opt_list_cgroup)
printf("@%llu\t", (unsigned long long)cgroup);
if (opt_list_mapcnt)