mirror of
https://github.com/JorjBauer/aiie.git
synced 2024-12-26 08:29:31 +00:00
get actual return value from ::write()
This commit is contained in:
parent
85993b903e
commit
0c2cf3f8ff
@ -210,9 +210,9 @@ int NixFileManager::write(int8_t fd, const void *buf, int nbyte)
|
||||
close(ffd);
|
||||
return -1;
|
||||
}
|
||||
ret = ::write(ffd, buf, nbyte);
|
||||
if (ret != nbyte) {
|
||||
printf("error writing: %d\n", errno);
|
||||
ssize_t rv = ::write(ffd, buf, nbyte);
|
||||
if (rv != nbyte) {
|
||||
printf("error writing: %d; wanted to write %d got %d\n", errno, nbyte, ret);
|
||||
}
|
||||
close(ffd);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user