0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-05-10 02:15:29 +00:00
Files
Sylirre d7f8c0cd29 fix(main/qemu-*): use proper patch for nfs reading
Now NFS share reading & writing confirmed to work.
2024-12-22 14:42:45 +02:00

28 lines
1.1 KiB
Diff

diff -uNr qemu-8.2.6/block/nfs.c qemu-8.2.6.mod/block/nfs.c
--- qemu-8.2.6/block/nfs.c 2024-07-16 23:23:46.000000000 +0300
+++ qemu-8.2.6.mod/block/nfs.c 2024-12-22 14:30:32.265373660 +0200
@@ -270,11 +270,11 @@
NFSRPC task;
nfs_co_init_task(bs, &task);
- task.iov = iov;
WITH_QEMU_LOCK_GUARD(&client->mutex) {
- if (nfs_pread_async(client->context, client->fh,
- offset, bytes, nfs_co_generic_cb, &task) != 0) {
+ if (nfs_pread_async(client->context, client->fh, iov->iov[0].iov_base,
+ bytes > iov->iov[0].iov_len ? iov->iov[0].iov_len : bytes,
+ offset, nfs_co_generic_cb, &task) != 0) {
return -ENOMEM;
}
@@ -320,7 +320,7 @@
WITH_QEMU_LOCK_GUARD(&client->mutex) {
if (nfs_pwrite_async(client->context, client->fh,
- offset, bytes, buf,
+ buf, bytes, offset,
nfs_co_generic_cb, &task) != 0) {
if (my_buffer) {
g_free(buf);