From 7071b4788b4b3d4610ecf8f4c8ddd5937c21134c Mon Sep 17 00:00:00 2001 From: xamidev <121681048+xamidev@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:30:20 +0200 Subject: [PATCH] Minor fix in initrd ls --- README.md | 4 ++-- src/kernel/initrd.c | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4348845..0b2894c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ![BlankOSshowcase](https://github.com/user-attachments/assets/63aae4ae-1633-4981-875d-8e2627ccc25c) > [!WARNING] -> The project is currently paused, after months of work around the subject. I've had enough for now, and I'll surely come back in some time to implement the more advanced stuff I had planned. For now, enjoy the latest alpha version. -> This is a hobbyist operating system, and it comes without any warranty whatsoever! See the license for more info. Feedback and contributions are highly appreciated. +> This is free and unencumbered software released into the public domain. Many things might be (are) broken. +> The project is a hobbyist operating system, and it comes without any warranty whatsoever! See the license for more info. Feedback and contributions are highly appreciated. # BlankOS diff --git a/src/kernel/initrd.c b/src/kernel/initrd.c index 0742d4f..f1dcf96 100644 --- a/src/kernel/initrd.c +++ b/src/kernel/initrd.c @@ -80,9 +80,21 @@ void ls_initrd(uint8_t* initrd, int verbose) { if (!verbose) { - printf("%s\n", header->filename); + if (header->typeflag == '5') + { + colorprintf(cyan, black, "%s\n", header->filename); + } else { + printf("%s\n", header->filename); + } } else { - printf("%7d\t%c\t %s\n", (int)header->size, header->typeflag, header->filename); + if (header->typeflag == '5') + { + printf("%7d\t%c\t", (int)header->size, header->typeflag); + colorprintf(cyan, black, " %s\n", header->filename); + } else { + + printf("%7d\t%c\t %s\n", (int)header->size, header->typeflag, header->filename); + } } uint32_t size = tar_parse_size(header->size);