mirror of
https://github.com/meizu-m86/kexec-tools-arm64
synced 2025-11-04 05:46:10 +08:00
kdump: print mmap() offset in hex
When mmap() fails, printing a large decimal number is mostly meaningless - it's not obvious what it means. Printing a hex number is more obvious, because we can see whether it's over 32-bit, or not page aligned. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
committed by
Simon Horman
parent
cb9056e009
commit
1c28b55604
@@ -37,7 +37,7 @@ static void *map_addr(int fd, unsigned long size, off_t offset)
|
||||
|
||||
result = mmap(0, len, PROT_READ, MAP_SHARED, fd, offset - map_offset);
|
||||
if (result == MAP_FAILED) {
|
||||
fprintf(stderr, "Cannot mmap " DEV_MEM " offset: %llu size: %lu: %s\n",
|
||||
fprintf(stderr, "Cannot mmap " DEV_MEM " offset: %#llx size: %lu: %s\n",
|
||||
(unsigned long long)offset, size, strerror(errno));
|
||||
exit(5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user