From 84b464a185d20d8e329b7aad0b482687a9705b58 Mon Sep 17 00:00:00 2001 From: Carlos Maiolino Date: Sun, 8 Mar 2026 13:37:37 +0100 Subject: Add a path parsing mechanism Now the system can parse paths to files/directories. It follows the same Unix standard namespace. For now, only absolute paths are allowed. The parse mechanism relies on the struct path_part. Which represents each component on a single path. All the components are chain-linked through path_part->next, where the last path component will have ->next == NULL. This also introduces path_root struct, which represents the root of the path. The first component, linked to path_root->head, is always the "/" component. The disk_id represents the disk the root directory is found into. This should actually (and likely will) be a mountpoint not a disk id. Signed-off-by: Carlos Maiolino --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2414134..f9c7c06 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,8 @@ KOBJ_FILES = $(KERNEL_ASM_OBJ) \ ./build/mm/paging.asm.o \ ./build/mm/paging.o \ ./build/drivers/ata.o \ - ./build/block/block.o + ./build/block/block.o \ + ./build/fs/path.o BOOT_TGT =./bin/boot.bin @@ -88,6 +89,9 @@ $(BUILD_DIR)/drivers/ata.o: ./src/drivers/ata.c $(BUILD_DIR)/block/block.o: ./src/block/block.c i686-elf-gcc $(INCLUDES) $(FLAGS) -std=gnu99 -c ./src/block/block.c -o $(BUILD_DIR)/block/block.o +$(BUILD_DIR)/fs/path.o: ./src/fs/path.c + i686-elf-gcc $(INCLUDES) $(FLAGS) -std=gnu99 -c ./src/fs/path.c -o $(BUILD_DIR)/fs/path.o + clean: rm -f $(BOOT_TGT) rm -f bin/kernel.bin @@ -102,4 +106,5 @@ clean: rm -f build/mm/*.o rm -f build/drivers/*.o rm -f build/block/*.o + rm -f build/fs/*.o rm -f bin/os.bin -- cgit v1.2.3