From 59cf6ef4d7daa099f835ee776a9f92882de8b886 Mon Sep 17 00:00:00 2001 From: Able Date: Sat, 21 Dec 2024 06:05:12 -0600 Subject: [PATCH] VFSaur work. String split bug. --- sysdata/programs/angels_halo/src/main.hb | 4 +-- sysdata/programs/vfsaur/README.md | 1 + sysdata/programs/vfsaur/meta.toml | 11 ++++++++ sysdata/programs/vfsaur/src/main.hb | 32 ++++++++++++++++++++++++ sysdata/system_config.toml | 5 ++++ 5 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 sysdata/programs/vfsaur/README.md create mode 100644 sysdata/programs/vfsaur/meta.toml create mode 100644 sysdata/programs/vfsaur/src/main.hb diff --git a/sysdata/programs/angels_halo/src/main.hb b/sysdata/programs/angels_halo/src/main.hb index b9452fa3..30614894 100644 --- a/sysdata/programs/angels_halo/src/main.hb +++ b/sysdata/programs/angels_halo/src/main.hb @@ -14,7 +14,5 @@ MonitoredProcess := struct { main := fn(): int { log.info("Angels Halo reincarnation server started.\0") - - return 0 -} +} \ No newline at end of file diff --git a/sysdata/programs/vfsaur/README.md b/sysdata/programs/vfsaur/README.md new file mode 100644 index 00000000..b074f7cb --- /dev/null +++ b/sysdata/programs/vfsaur/README.md @@ -0,0 +1 @@ +# vfsaur \ No newline at end of file diff --git a/sysdata/programs/vfsaur/meta.toml b/sysdata/programs/vfsaur/meta.toml new file mode 100644 index 00000000..06ba3689 --- /dev/null +++ b/sysdata/programs/vfsaur/meta.toml @@ -0,0 +1,11 @@ +[package] +name = "vfsaur" +authors = [""] + +[dependants.libraries] + +[dependants.binaries] +hblang.version = "1.0.0" + +[build] +command = "hblang src/main.hb" diff --git a/sysdata/programs/vfsaur/src/main.hb b/sysdata/programs/vfsaur/src/main.hb new file mode 100644 index 00000000..c3c1faaa --- /dev/null +++ b/sysdata/programs/vfsaur/src/main.hb @@ -0,0 +1,32 @@ +stn := @use("stn"); + +.{log} := stn; +.{info} := log; + +.{string} := stn; +.{split_str, iter_split_str} := string; +.{split, iter_split} := string; + +.{buffer} := stn + +main := fn(): int { + log.info("VFSaur starting.\0") + vfs_buff := buffer.create("VFS\0") + + full_path := "acs:/path/to/a/file\0" + splt := split(full_path, ':') + root := iter_split(&splt) + path := iter_split(&splt) + + if root == null { + return 1 + } + if path == null { + return 2 + } + + log.info(root) + log.info(path) + + return 0 +} diff --git a/sysdata/system_config.toml b/sysdata/system_config.toml index 423ba4f4..37b428a2 100644 --- a/sysdata/system_config.toml +++ b/sysdata/system_config.toml @@ -23,6 +23,7 @@ resolution = "1024x768x24" [boot.limine.ableos.modules] + [boot.limine.ableos.modules.render_example] path = "boot:///render_example.hbf" @@ -50,5 +51,9 @@ path = "boot:///ps2_mouse_driver.hbf" # [boot.limine.ableos.modules.angels_halo] # path = "boot:///angels_halo.hbf" + # [boot.limine.ableos.modules.test] # path = "boot:///test.hbf" +# +[boot.limine.ableos.modules.vfsaur] +path = "boot:///vfsaur.hbf"