mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
RTL8192DU: fix vfs_read
This commit is contained in:
parent
7146f54fb1
commit
d853a4fa07
@ -0,0 +1,27 @@
|
||||
From 9e477ff7fb1626f188e0d3314799371a5cce8681 Mon Sep 17 00:00:00 2001
|
||||
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||
Date: Wed, 13 Jun 2018 18:54:09 +0100
|
||||
Subject: [PATCH] fix vfs_read with 4.14.y+
|
||||
|
||||
---
|
||||
os_dep/osdep_service.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
|
||||
index 9dd3d2b..bd1df96 100644
|
||||
--- a/os_dep/osdep_service.c
|
||||
+++ b/os_dep/osdep_service.c
|
||||
@@ -1055,7 +1055,9 @@ static int readFile(struct file *fp,char *buf,int len)
|
||||
return -EPERM;
|
||||
|
||||
while(sum<len) {
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||
+ rlen = kernel_read(fp, buf+sum, len-sum, &fp->f_pos);
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||
rlen = __vfs_read(fp, buf+sum, len-sum, &fp->f_pos);
|
||||
#else
|
||||
rlen = fp->f_op->read(fp, buf+sum, len-sum, &fp->f_pos);
|
||||
--
|
||||
2.14.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user