Let's always assume positions, offsets, etc.. as 64-bit numbers.
Signed-off-by: Karel Zak <kzak@redhat.com>
|| (file)->association == -ASSOC_SHM \
|| (file)->association == -ASSOC_MEM)
-static unsigned long get_map_length(struct file *file)
+static uint64_t get_map_length(struct file *file)
{
- unsigned long res = 0;
+ uint64_t res = 0;
if (is_association(file, SHM) || is_association(file, MEM)) {
static size_t pagesize = 0;
if (fd >= 0)
sprintf(path, "/proc/%d/fd/%d", file->proc->pid, fd);
else
- sprintf(path, "/proc/%d/map_files/%lx-%lx",
+ sprintf(path, "/proc/%d/map_files/%"PRIx64 "-%" PRIx64,
file->proc->pid,
file->map_start,
file->map_end);
ssize_t len;
char sym[PATH_MAX];
struct file *f;
- unsigned long start, end;
+ uint64_t start, end;
struct map *map;
enum association assoc;
mode_t mode = 0;
map = NULL;
- if (sscanf(dp->d_name, "%lx-%lx", &start, &end) == 2)
+ if (sscanf(dp->d_name, "%" SCNx64 "-%" SCNx64, &start, &end) == 2)
map = find_map(maps, start);
assoc = (map && map->shared)? ASSOC_SHM: ASSOC_MEM;
#include <stdbool.h>
#include <sys/stat.h>
#include <dirent.h>
+#include <inttypes.h>
#include "list.h"
struct stat stat;
mode_t mode;
struct proc *proc;
- uint64_t pos;
- unsigned long map_start;
- unsigned long map_end;
+ uint64_t pos;
+ uint64_t map_start;
+ uint64_t map_end;
unsigned int sys_flags;
unsigned int mnt_id;