2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

proc_parse: Invert supported VMA check

It's for more natural adding of new else-if branch for aio.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2014-12-17 18:11:40 +03:00
parent f408bc0331
commit ab2c1e426c

View File

@@ -488,8 +488,11 @@ int parse_smaps(pid_t pid, struct vm_area_list *vma_area_list, bool use_map_file
goto err;
}
if (!S_ISREG(st_buf->st_mode) &&
!(S_ISCHR(st_buf->st_mode) && st_buf->st_rdev == DEVZERO)) {
if (S_ISREG(st_buf->st_mode))
/* regular file mapping -- supported */;
else if (S_ISCHR(st_buf->st_mode) && (st_buf->st_rdev == DEVZERO))
/* devzero mapping -- also makes sense */;
else {
pr_err("Can't handle non-regular mapping on %d's map %#lx\n", pid, start);
goto err;
}