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

View File

@ -257,9 +257,9 @@ bool SCSIPrinter::WriteBytes(BYTE *buf, uint32_t length)
LOGTRACE("Appending %d byte(s) to printer output file", 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) bool SCSIPrinter::CheckReservation(SCSIDEV *controller)