mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-18 22:30:07 +01:00
Fix debug message when zeroing rest of data device.
The debug message printed wrong expected value and also remained silent if expected value differed from real bytes written to the data device.
This commit is contained in:
committed by
Milan Broz
parent
e9dcf6b8dd
commit
faa07b71f9
@@ -1054,9 +1054,9 @@ static void zero_rest_of_device(int fd, size_t block_size, void *buf,
|
||||
s1 = *bytes;
|
||||
|
||||
s2 = write(fd, buf, s1);
|
||||
if (s2 < 0) {
|
||||
log_dbg("Write error, expecting %zu, got %zd.",
|
||||
block_size, s2);
|
||||
if (s2 != s1) {
|
||||
log_dbg("Write error, expecting %zd, got %zd.",
|
||||
s1, s2);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user