diff --git a/apps/include/cpos.h b/apps/include/cpos.h index c896bb2..68e6ccf 100644 --- a/apps/include/cpos.h +++ b/apps/include/cpos.h @@ -1,6 +1,8 @@ #ifndef CRASHPOWEROS_CPOS_H #define CRASHPOWEROS_CPOS_H +#include "ctype.h" + struct sysinfo{ char* osname; char* kenlname; @@ -10,6 +12,12 @@ struct sysinfo{ unsigned int pci_device; unsigned int frame_width; unsigned int frame_height; + uint32_t year; + uint32_t mon; + uint32_t day; + uint32_t hour; + uint32_t min; + uint32_t sec; }; #include "syscall.h" diff --git a/apps/shell/neofetch.c b/apps/shell/neofetch.c index e892b3a..ecabcd9 100644 --- a/apps/shell/neofetch.c +++ b/apps/shell/neofetch.c @@ -16,7 +16,7 @@ void print_info(){ " &@@@@@@@@@@@@@&=. #@@@@@@@@@@@@@@@@@#:.= Console: CPOS_USER_SHELL\n" " *@@@@@@@@@@@@@- #@@@@@@@@@@@@@@@#:.=@@+ PCI Device: %d\n" ":@@@@@@@@@@@@&. #@@@@@@@@@@@@@#: =@@@@@. Resolution: %d x %d\n" - "#@@@@@@@@@@@@. #@@@@@@@@@@@#: =@@@@@@@+\n" + "#@@@@@@@@@@@@. #@@@@@@@@@@@#: =@@@@@@@+ Time: %d/%d/%d %d:%d\n" "@@@@@@@@@@@@+ *&&&&&&&&&#- =@@@@@@@@@&\n" "@@@@@@@@@@@@- :@@@@@@@@@@@@\n" "@@@@@@@@@@@@+ #@@@@@@@@@@@&\n" @@ -38,7 +38,13 @@ void print_info(){ info->phy_mem_size, info->pci_device, info->frame_width, - info->frame_height); + info->frame_height, + info->year, + info->mon, + info->day, + info->hour, + info->min, + info->sec); free_info(info); } \ No newline at end of file diff --git a/src/kernel/syscall.c b/src/kernel/syscall.c index 6be70fd..f4cbd4c 100644 --- a/src/kernel/syscall.c +++ b/src/kernel/syscall.c @@ -69,10 +69,16 @@ struct sysinfo{ char* kenlname; char* cpu_vendor; char* cpu_name; - unsigned int phy_mem_size; - unsigned int pci_device; - unsigned int frame_width; - unsigned int frame_height; + uint32_t phy_mem_size; + uint32_t pci_device; + uint32_t frame_width; + uint32_t frame_height; + uint32_t year; + uint32_t mon; + uint32_t day; + uint32_t hour; + uint32_t min; + uint32_t sec; }; static void* syscall_sysinfo(uint32_t ebx,uint32_t ecx,uint32_t edx,uint32_t esi,uint32_t edi){ @@ -98,6 +104,12 @@ static void* syscall_sysinfo(uint32_t ebx,uint32_t ecx,uint32_t edx,uint32_t esi info->pci_device = PCI_NUM; info->frame_width = width; info->frame_height = height; + info->year = get_year(); + info->mon = get_mon(); + info->day = get_day_of_month(); + info->hour = get_hour(); + info->min = get_min(); + info->sec = get_sec(); return info; }