Skip to content

Commit

Permalink
remove calls to mm_segment_t, this type is no longer defined and is n…
Browse files Browse the repository at this point in the history
…ot needed
  • Loading branch information
tomaspinho committed May 30, 2022
1 parent 190c2cb commit 05aae2a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion os_dep/osdep_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -2204,7 +2204,9 @@ static int isFileReadable(const char *path, u32 *sz)
{
struct file *fp;
int ret = 0;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0))
mm_segment_t oldfs;
#endif
char buf;

fp = filp_open(path, O_RDONLY, 0);
Expand Down Expand Up @@ -2249,7 +2251,9 @@ static int isFileReadable(const char *path, u32 *sz)
static int retriveFromFile(const char *path, u8 *buf, u32 sz)
{
int ret = -1;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0))
mm_segment_t oldfs;
#endif
struct file *fp;

if (path && buf) {
Expand All @@ -2267,7 +2271,7 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz)
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
set_fs(oldfs);
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0))
force_uaccess_end(oldfs);
force_uaccess_end(oldfs);
#endif
closeFile(fp);

Expand All @@ -2292,7 +2296,9 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz)
static int storeToFile(const char *path, u8 *buf, u32 sz)
{
int ret = 0;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0))
mm_segment_t oldfs;
#endif
struct file *fp;

if (path && buf) {
Expand Down

0 comments on commit 05aae2a

Please sign in to comment.