diff options
| author | Anser <rostgans@tutamail.com> | 2026-08-11 00:18:57 +0200 |
|---|---|---|
| committer | Anser <rostgans@tutamail.com> | 2026-08-11 00:18:57 +0200 |
| commit | eb6f986361713d6ce47c6d4572bb24d9f6207ddf (patch) | |
| tree | 3fca62d5cad785acce36a46a660219840c959932 /src/os.c | |
| parent | 9ad584b5762433f7c99d7cc7b65ad21ebe4ff932 (diff) | |
TOBESQUISHED: safe in reconstruction of the codes layout and rework of information handeling also ascii art printing
Diffstat (limited to 'src/os.c')
| -rw-r--r-- | src/os.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/os.c b/src/os.c new file mode 100644 index 0000000..fd5b7ae --- /dev/null +++ b/src/os.c @@ -0,0 +1,18 @@ +#include "../include/cfetch.h" + +#include <sys/utsname.h> + +void get_os(system_info_t *info) { +#ifdef __linux__ + struct utsname u; + + if (uname(&u) == 0) { + size_t length = printf("OS: %s %s %s %s\n", u.sysname, u.release, u.version, u.machine); + printf("line length: %ld\n", length); + } else { + perror("Error while accessing uname"); + return; + } +#endif + return; +} |
