handle the return value of write() (#810)

Co-authored-by: Tony Kuker <akuker@gmail.com>
This commit is contained in:
akuker 2022-08-26 03:19:42 -05:00 committed by GitHub
parent aeb6576996
commit c6da145f0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -257,9 +257,9 @@ bool SCSIPrinter::WriteBytes(BYTE *buf, uint32_t length)
LOGTRACE("Appending %d byte(s) to printer output file", length);
write(fd, buf, length);
uint32_t num_written = write(fd, buf, length);
return true;
return (num_written == length);
}
bool SCSIPrinter::CheckReservation(SCSIDEV *controller)