diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-01-04 18:06:31 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-01-04 18:06:31 +0800 |
| commit | 3886749b1c8d79d4701bf6b8e66249c4e1491648 (patch) | |
| tree | 142e6d9ada3d511663c6c0540196d270c69c0227 /src/kernel/syscall.cc | |
| parent | a64d25c07b31d57f8706073e11cd774d0880d6dd (diff) | |
| download | lume-3886749b1c8d79d4701bf6b8e66249c4e1491648.tar.gz lume-3886749b1c8d79d4701bf6b8e66249c4e1491648.tar.xz | |
dev(shell): implement basic shell tools
fixed(file-system): fixed read and write bugs
Diffstat (limited to 'src/kernel/syscall.cc')
| -rw-r--r-- | src/kernel/syscall.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kernel/syscall.cc b/src/kernel/syscall.cc index 259a5e6..9f88649 100644 --- a/src/kernel/syscall.cc +++ b/src/kernel/syscall.cc @@ -503,7 +503,9 @@ static uint64_t sys_read() // get param: fd, buf, len if (argint(0, &fd) < 0 || argint(2, &n) < 0 || argint(1, (int *)&p) < 0) return -1; - + + p = argraw(1); + struct Proc* proc = myproc(); if (fd == 0 && proc->ofile[fd] == nullptr) { |
