X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/d15268ba6eadf89a38087995ff407f50418485fb..9d4cc53314b8e2a236401733ac6c7093c97d4351:/lunaix-os/LConfig diff --git a/lunaix-os/LConfig b/lunaix-os/LConfig index d66375d..65cfb07 100644 --- a/lunaix-os/LConfig +++ b/lunaix-os/LConfig @@ -2,6 +2,15 @@ from datetime import datetime, date from . import kernel, arch, hal +@native +def get_patch_seq(): + today = date.today() + year = today.year + start_of_year = datetime(year, 1, 1).date() + seq_num = (today - start_of_year).days + + return "%d%d"%(year - 2000, seq_num) + @"Kernel Version" @readonly def lunaix_ver() -> str: @@ -9,12 +18,7 @@ def lunaix_ver() -> str: Lunaix kernel version """ - today = date.today() - year = today.year - start_of_year = datetime(year, 1, 1).date() - seq_num = (today - start_of_year).days - - return "%s v0.%d%d"%(arch.val, year - 2000, seq_num) + return f"{arch.val} v0.0.{get_patch_seq()}" @"Kernel Debug and Testing" def debug_and_testing(): @@ -46,7 +50,7 @@ def debug_and_testing(): Set the maximum time (in seconds) spent in kernel before considered to be stalled. """ - require(check_stall) + require (check_stall) return 10 @@ -58,7 +62,7 @@ def debug_and_testing(): Setting it to 0 disable this check """ - require(check_stall) + require (check_stall) return 0