dmuserd: Fix error checking
We change read_all() and write_all() to return signed values, so our negative error return values will be correctly caught. Test: TreeHugger Change-Id: I4d03d4475bccb40ae4b84a846966139b34ede2bd
This commit is contained in:
parent
48c35f0cf6
commit
10e3d620b4
1 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ struct dm_user_message {
|
|||
|
||||
static bool verbose = false;
|
||||
|
||||
size_t write_all(int fd, void* buf, size_t len) {
|
||||
ssize_t write_all(int fd, void* buf, size_t len) {
|
||||
char* buf_c = (char*)buf;
|
||||
ssize_t total = 0;
|
||||
ssize_t once;
|
||||
|
@ -94,7 +94,7 @@ size_t write_all(int fd, void* buf, size_t len) {
|
|||
return total;
|
||||
}
|
||||
|
||||
size_t read_all(int fd, void* buf, size_t len) {
|
||||
ssize_t read_all(int fd, void* buf, size_t len) {
|
||||
char* buf_c = (char*)buf;
|
||||
ssize_t total = 0;
|
||||
ssize_t once;
|
||||
|
|
Loading…
Reference in a new issue