mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 10:26:59 +00:00
fs: implement FAT32 LFN support and root volume abstraction
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// This header needs to maintain in any file it is present in, as per the GPL license terms.
|
||||
#include "tar.h"
|
||||
#include "fat32.h"
|
||||
#include "bootfs.h"
|
||||
|
||||
// The standard TAR header block is 512 bytes.
|
||||
struct tar_header {
|
||||
@@ -111,8 +112,12 @@ void tar_parse(void *archive, uint64_t archive_size) {
|
||||
parent_path[last_slash] = '\0';
|
||||
tar_mkdir_recursive(parent_path);
|
||||
}
|
||||
|
||||
if (full_path[0] == '/' && full_path[1] == 'b' && full_path[2] == 'o' &&
|
||||
full_path[3] == 'o' && full_path[4] == 't' && full_path[5] == '/') {
|
||||
bootfs_register_file(full_path + 6, ptr + 512, (uint32_t)file_size);
|
||||
}
|
||||
|
||||
// Extract the file data block directly into the VFS
|
||||
FAT32_FileHandle *fh = fat32_open(full_path, "w");
|
||||
if (fh && fh->valid) {
|
||||
fat32_write(fh, ptr + 512, file_size);
|
||||
|
||||
Reference in New Issue
Block a user