mirror of
https://github.com/morrownr/8821cu-20210916.git
synced 2024-11-26 07:14:41 +00:00
fix previous fix
This commit is contained in:
parent
f640decf5d
commit
6b5630bc37
@ -2428,6 +2428,7 @@ static int readFile(struct file *fp, char *buf, int len)
|
|||||||
|
|
||||||
while (sum < len) {
|
while (sum < len) {
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||||
|
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||||
rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos);
|
rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos);
|
||||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||||
rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos);
|
rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos);
|
||||||
@ -2459,6 +2460,7 @@ static int writeFile(struct file *fp, char *buf, int len)
|
|||||||
|
|
||||||
while (sum < len) {
|
while (sum < len) {
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||||
|
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||||
wlen = kernel_write(fp, buf + sum, len - sum, &fp->f_pos);
|
wlen = kernel_write(fp, buf + sum, len - sum, &fp->f_pos);
|
||||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||||
wlen = __vfs_write(fp, buf + sum, len - sum, &fp->f_pos);
|
wlen = __vfs_write(fp, buf + sum, len - sum, &fp->f_pos);
|
||||||
@ -2703,7 +2705,7 @@ int rtw_is_file_readable(const char *path)
|
|||||||
else
|
else
|
||||||
return _FALSE;
|
return _FALSE;
|
||||||
#else
|
#else
|
||||||
RTW_INFO("%s() Android GKI prohibbit kernel_read, return _TRUE\n", __func__);
|
// RTW_INFO("%s() Android GKI prohibbit kernel_read, return _TRUE\n", __func__);
|
||||||
return _TRUE;
|
return _TRUE;
|
||||||
#endif /* !defined(CONFIG_RTW_ANDROID_GKI) */
|
#endif /* !defined(CONFIG_RTW_ANDROID_GKI) */
|
||||||
#else
|
#else
|
||||||
@ -2727,7 +2729,7 @@ int rtw_is_file_readable_with_size(const char *path, u32 *sz)
|
|||||||
else
|
else
|
||||||
return _FALSE;
|
return _FALSE;
|
||||||
#else
|
#else
|
||||||
RTW_INFO("%s() Android GKI prohibbit kernel_read, return _TRUE\n", __func__);
|
// RTW_INFO("%s() Android GKI prohibbit kernel_read, return _TRUE\n", __func__);
|
||||||
*sz = 0;
|
*sz = 0;
|
||||||
return _TRUE;
|
return _TRUE;
|
||||||
#endif /* !defined(CONFIG_RTW_ANDROID_GKI) */
|
#endif /* !defined(CONFIG_RTW_ANDROID_GKI) */
|
||||||
|
Loading…
Reference in New Issue
Block a user