forked from KolibriOS/kolibrios
Fixed get os version in SHELL
Signed-off-by: Maxim Logaev <maxlogaev@proton.me>
This commit is contained in:
@@ -759,6 +759,34 @@ KOSAPI void _ksys_shutdown(uint32_t shd_param)
|
||||
asm_inline("int $0x40" ::"a"(18), "b"(9), "c"(shd_param));
|
||||
}
|
||||
|
||||
/*========= Function 18, subfunction 13 - get OS version. ========*/
|
||||
|
||||
#define KSYS_VER_HASH_LEN 9
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
struct {
|
||||
uint8_t major;
|
||||
uint8_t minor;
|
||||
uint8_t patch;
|
||||
uint8_t __reserved;
|
||||
};
|
||||
uint32_t value;
|
||||
} tag;
|
||||
uint16_t offset;
|
||||
char hash[KSYS_VER_HASH_LEN + 1];
|
||||
} ksys_os_ver_t;
|
||||
|
||||
KOSAPI int _ksys_get_os_ver(ksys_os_ver_t *ver)
|
||||
{
|
||||
int status;
|
||||
asm_inline(
|
||||
"int $0x40"
|
||||
: "=a"(status)
|
||||
: "a"(18), "b"(13), "c"(ver));
|
||||
return status;
|
||||
}
|
||||
|
||||
/*========= Function 18, subfunction 16 - get size of free RAM. ========*/
|
||||
|
||||
KOSAPI size_t _ksys_get_ram_size(void)
|
||||
|
Reference in New Issue
Block a user