Re: [PATCH] m68k: Fix off-by-one calendar month

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/04/2018 12:51:32+0200, Geert Uytterhoeven wrote:
Note that this change may break existing users. I'm perfectly fine with
it as doing this is generally wrong anyway and this is something I'd
like to see eliminated.

The year handling is moved into the various mach_hwclk() implementations
in the same patch (in the "<snip>" part).


Ok.


-               ts->tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday,
-                                     time.tm_hour, time.tm_min, time.tm_sec);
-       }
+       ts->tv_sec = mktime(time.tm_year + 1900, time.tm_mon + 1, time.tm_mday,
+                           time.tm_hour, time.tm_min, time.tm_sec);

That might explain why my Amiga spends so much time on file system checks
since I wrote the rp5c01 RTC driver...

Upon closer look, it's not, as Amiga no longer provides mach_hwclk().
So it must be due to fsck running before the rtc module is loaded?


Quite possibly, an easy way to know is to check the system time beofre
fsck runs.


-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux