Auto merge of #1483 - RalfJung:fs-errno, r=RalfJung
set errno on stdout write failure
This commit is contained in:
commit
c44f1ae485
@ -133,8 +133,10 @@ fn emulate_foreign_item_by_name(
|
|||||||
};
|
};
|
||||||
match res {
|
match res {
|
||||||
Ok(n) => i64::try_from(n).unwrap(),
|
Ok(n) => i64::try_from(n).unwrap(),
|
||||||
// FIXME: set errno to appropriate value
|
Err(e) => {
|
||||||
Err(_) => -1,
|
this.set_last_error_from_io_error(e)?;
|
||||||
|
-1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.write(fd, buf, count)?
|
this.write(fd, buf, count)?
|
||||||
|
Loading…
Reference in New Issue
Block a user