Fix the compare with 'unsigned' sizeof() and error read -1 result.
So the read error is correctly recognized.
Version 2.02.144 -
=====================================
+ Fir read error detection when checking for uninitialized thin-pool header.
Fix error path for internal error in lvmetad vg lookup code.
Version 2.02.143 - 21st February 2016
return 0;
}
/* let's assume there is no problem to read 64 bytes */
- if (read(fd, buf, sizeof(buf)) < sizeof(buf)) {
+ if (read(fd, buf, sizeof(buf)) < (int)sizeof(buf)) {
log_sys_error("read", argv[args]);
if (close(fd))
log_sys_error("close", argv[args]);