Skip to content

Commit

Permalink
fix(hypercall): add syserr to write's fd checks
Browse files Browse the repository at this point in the history
  • Loading branch information
n0toose committed Jan 10, 2025
1 parent 83fb5df commit 823ea51
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hypercall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ pub fn write<B: VirtualizationBackend>(
)
.unwrap();

if syswrite.fd == 1 {
// fd 0 is stdout
if syswrite.fd == 1 || syswrite.fd == 2 {
let bytes = unsafe {
parent_vm
.mem
Expand Down

0 comments on commit 823ea51

Please sign in to comment.