mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-28 12:36:47 +00:00
test/packet_sock_mmap: parse inode as unsigned long long
7f95a16df000-7f95a16e1000 rw-p 00000000 00:09 2183152397 socket:[2183152397] Reported-by: Mr Jenkins Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
parent
3ca4c73e47
commit
cb6768b62c
1 changed files with 4 additions and 3 deletions
|
|
@ -35,16 +35,17 @@ struct tpacket_req3 {
|
|||
static void check_map_is_there(unsigned long addr, int sk)
|
||||
{
|
||||
FILE *f;
|
||||
char line[64];
|
||||
char line[4096];
|
||||
struct stat ss;
|
||||
|
||||
fstat(sk, &ss);
|
||||
f = fopen("/proc/self/maps", "r");
|
||||
while (fgets(line, sizeof(line), f) != NULL) {
|
||||
unsigned long long ino;
|
||||
unsigned long start;
|
||||
int maj, min, ino;
|
||||
int maj, min;
|
||||
|
||||
sscanf(line, "%lx-%*x %*s %*s %x:%x %d %*s", &start, &maj, &min, &ino);
|
||||
sscanf(line, "%lx-%*x %*s %*s %x:%x %llu %*s", &start, &maj, &min, &ino);
|
||||
if ((start == addr) && ss.st_dev == makedev(maj, min) && ss.st_ino == ino) {
|
||||
pass();
|
||||
fclose(f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue