From 8c2fe69b292a67ab5458e5ca62081fdffc106eea Mon Sep 17 00:00:00 2001 From: Christian B Date: Wed, 15 Nov 2017 20:07:10 +0100 Subject: [PATCH] Minor cleanup to Kernel v4.14 Support --- os_dep/osdep_service.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 13a5bea..7a3f777 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -1919,12 +1919,10 @@ 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); -#else +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)) rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos); -#endif #else rlen = fp->f_op->read(fp, buf + sum, len - sum, &fp->f_pos); #endif