diff options
author | Robert Morris <[email protected]> | 2020-08-07 15:06:43 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2020-08-10 11:19:10 -0400 |
commit | e3b7058907dff779cf94e23bf6bb84245faf481d (patch) | |
tree | 897b1539a46d30b14a85965a9e90ecdb0286bcfe /kernel/pipe.c | |
parent | a93321cb2547dbb48bf8ce9ad623ac19eefbecea (diff) | |
download | xv6-labs-e3b7058907dff779cf94e23bf6bb84245faf481d.tar.gz xv6-labs-e3b7058907dff779cf94e23bf6bb84245faf481d.tar.bz2 xv6-labs-e3b7058907dff779cf94e23bf6bb84245faf481d.zip |
streamline copyin/copyout code in usertests
fix bugs in read/write return values when there's an error
Diffstat (limited to 'kernel/pipe.c')
-rw-r--r-- | kernel/pipe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/pipe.c b/kernel/pipe.c index c066afb..7ed402d 100644 --- a/kernel/pipe.c +++ b/kernel/pipe.c @@ -96,7 +96,7 @@ pipewrite(struct pipe *pi, uint64 addr, int n) } wakeup(&pi->nread); release(&pi->lock); - return n; + return i; } int |