fixed bug related to f_offset: parse hexadecimal

This commit is contained in:
mykola2312 2024-08-29 21:16:14 +03:00
parent 1606be8556
commit e14b420b1f

View file

@ -313,7 +313,7 @@ int procstat_parse_maps(pid_t pid, procstat_map_t** maps, size_t* count)
} }
} }
// f_offset // f_offset
map->f_offset = strtoull(offset, NULL, 10); map->f_offset = strtoull(offset, NULL, 16);
// dev_major and dev_minor // dev_major and dev_minor
sscanf(device, "%d:%d", &map->dev_major, &map->dev_minor); sscanf(device, "%d:%d", &map->dev_major, &map->dev_minor);
// inode // inode