main(): Call adainit()/adafinal()
diff --git a/src/main.c b/src/main.c
index ee3095c..723e26c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -5,6 +5,9 @@
#include "blockdev.h"
#include "vfs.h"
+extern void adainit (void);
+extern void adafinal (void);
+
struct program_options {
char *devname;
};
@@ -15,20 +18,27 @@
int main(int argc, char* argv[])
{
struct program_options opt;
+ int ret = -1;
+
+ adainit();
if (get_options(argc, argv, &opt)) {
- return -1;
+ goto final;
}
if (devopen(opt.devname, NULL) != 1) {
- return -1;
+ goto final;
}
- // TODO
+ fs_tests();
devclose();
- return 0;
+ ret = 0;
+
+final:
+ adafinal();
+ return ret;
}