summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/driver/pata.c
diff options
context:
space:
mode:
authordzwdz2023-01-25 01:02:04 +0100
committerdzwdz2023-01-25 01:04:49 +0100
commit2a2fc4dffe0117ce874a6cf1dcc34321ed8add77 (patch)
treeaf1e24f72241dbbff97797b9e186f7d27b5b54b4 /src/kernel/arch/amd64/driver/pata.c
parent52e7fe3c679469032e77a5ca4adf19618ba1201b (diff)
kernel/virt: replace the virt_cpy api with a more foolproof one
Diffstat (limited to 'src/kernel/arch/amd64/driver/pata.c')
-rw-r--r--src/kernel/arch/amd64/driver/pata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/arch/amd64/driver/pata.c b/src/kernel/arch/amd64/driver/pata.c
index 3d5e3c6..6928b4e 100644
--- a/src/kernel/arch/amd64/driver/pata.c
+++ b/src/kernel/arch/amd64/driver/pata.c
@@ -51,7 +51,7 @@ static void accept(struct vfs_request *req) {
fs_normslice(&req->offset, &req->output.len, ata_size(id), false);
len = min(req->output.len, sizeof wbuf);
ata_read(id, wbuf, len, req->offset);
- virt_cpy_to(req->caller->pages, req->output.buf, wbuf, len);
+ pcpy_to(req->caller, req->output.buf, wbuf, len);
vfsreq_finish_short(req, len);
break;
@@ -63,7 +63,7 @@ static void accept(struct vfs_request *req) {
fs_normslice(&req->offset, &req->input.len, ata_size(id), false);
len = min(req->input.len, sizeof wbuf);
if (len != 0) {
- virt_cpy_from(req->caller->pages, wbuf, req->input.buf, len);
+ len = pcpy_from(req->caller, wbuf, req->input.buf, len);
ata_write(id, wbuf, len, req->offset);
}
vfsreq_finish_short(req, len);