Use read/write buffer functions where appropriate.

This commit is contained in:
Ondrej Kozina
2015-11-30 16:44:17 +01:00
committed by Milan Broz
parent 327ebccdb1
commit 2d298071e4
3 changed files with 11 additions and 12 deletions

View File

@@ -469,8 +469,7 @@ static int TCRYPT_pool_keyfile(struct crypt_device *cd,
return -EIO;
}
/* FIXME: add while */
data_size = read(fd, data, TCRYPT_KEYFILE_LEN);
data_size = read_buffer(fd, data, TCRYPT_KEYFILE_LEN);
close(fd);
if (data_size < 0) {
log_err(cd, _("Error reading keyfile %s.\n"), keyfile);