Add basic tools

This commit is contained in:
2026-10-18 18:27:34 +02:00
parent b567d8539c
commit b6ffd2c8c6
12 changed files with 638 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#include <stdio.h>
#include <string.h>
#include <sys/mount.h>
int main(int argc, char** argv) {
if (argc < 3) {
fprintf(stderr, "usage: %s <fstype> <target> [source]\n", argv[0]);
return 2;
}
const char* fstype = argv[1];
const char* target = argv[2];
const char* source = argc >= 4 ? argv[3] : NULL;
if (mount(fstype, target, 0, (void*)source) != 0) {
perror("mount");
return 1;
}
return 0;
}