Minor fix in initrd ls
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||

|
||||
|
||||
> [!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
|
||||
|
||||
|
||||
@@ -80,10 +80,22 @@ 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 {
|
||||
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);
|
||||
uint32_t next_file_offset = ((size+TAR_BLOCK_SIZE-1)/TAR_BLOCK_SIZE)*TAR_BLOCK_SIZE;
|
||||
|
||||
Reference in New Issue
Block a user