mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-05 08:45:49 +00:00
util: Print message when read size is bad
Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
committed by
Cyrill Gorcunov
parent
379dde63f5
commit
8836f20c64
@@ -134,8 +134,10 @@ extern void printk(const char *format, ...);
|
||||
#define read_safe_eof(fd, ptr, size, err) \
|
||||
({ \
|
||||
size_t rc__ = read(fd, ptr, (size)); \
|
||||
if (rc__ && rc__ != (size)) \
|
||||
if (rc__ && rc__ != (size)) { \
|
||||
pr_err("img corruption %d/%d\n", rc__, (size));\
|
||||
goto err; \
|
||||
} \
|
||||
rc__; \
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user