dorimanx / exfat-nofuse

Android ARM Linux non-fuse read/write kernel driver for exFat and VFat Android file systems
GNU General Public License v2.0
707 stars 326 forks source link

exfat: Stop using CURRENT_TIME_SEC #114

Closed hyperb1iss closed 7 years ago

hyperb1iss commented 7 years ago
dorimanx commented 7 years ago

Before i merge, do all linux builds has all needed functions? As i dont see any kernel ver checks. Thanks.

hyperb1iss commented 7 years ago

ktime_get_real_ts64 was introduced in 3.17. I can wrap this in a macro.

hyperb1iss commented 7 years ago

This seems to be the right way to go. Turns out CURRENT_TIME_SEC is not y2038 safe either.

hyperb1iss commented 7 years ago

Haven't tested this actually works on an old kernel though, I'll try it out on an Android kernel later tonight.

dorimanx commented 7 years ago

Thanks, will be great to get support for all kernels, this driver used from 2.6.x to 4.12.x as of now. Every change, we have to make sure its not braking that.

hyperb1iss commented 7 years ago

There we go. This works on my 4.12-rc4 laptop and my OnePlus 3 (3.18). Kernels before 4.8 (when current_time appeared) will use the old code hidden under a macro.

dorimanx commented 7 years ago

Looks great, thanks for your contribution!