summaryrefslogtreecommitdiff
path: root/main.ha
diff options
context:
space:
mode:
Diffstat (limited to 'main.ha')
-rw-r--r--main.ha28
1 files changed, 28 insertions, 0 deletions
diff --git a/main.ha b/main.ha
new file mode 100644
index 0000000..c9e82c3
--- /dev/null
+++ b/main.ha
@@ -0,0 +1,28 @@
+use fmt;
+use bfs;
+use io;
+use fs;
+use os;
+
+export fn main() void = {
+ //const file = os::open("fs.img", fs::flags::RDWR)!;
+ //defer io::close(file)!;
+ //const filesystem = bfs::open(file)!;
+ //defer bfs::close(filesystem)!;
+
+ //for (let i = 150; i <= 190; i += 1)
+ // bfs::freeinode(filesystem, i: u64)!;
+ //bfs::freeinode(filesystem, 1484)!;
+ //bfs::freeinode(filesystem, 1485)!;
+ //bfs::freeinode(filesystem, 1486)!;
+ //bfs::freeinode(filesystem, 1487)!;
+ //const inid = bfs::allocinode(filesystem)!;
+ //const blockid = bfs::allocblock(filesystem)!;
+ //bfs::bootsector_make(filesystem.bootsector, 1);
+ //fmt::println(inid)!;
+ //bfs::allocblock(filesystem)!;
+ // bfs::freeblock(filesystem, 8)!;
+ // bfs::freeblock(filesystem, 9)!;
+ // bfs::freeblock(filesystem, 10)!;
+ return;
+};