android_mt6572_jiabo/bootable/recovery/fstools/fstools.cpp
2025-09-05 16:56:03 +08:00

23 lines
445 B
C++

#include <stdlib.h>
extern "C" {
#include "fstools.h"
}
int
main(int argc, char **argv) {
// Handle alternative invocations
char* command = argv[0];
char* stripped = strrchr(argv[0], '/');
if (stripped)
command = stripped + 1;
if (strcmp(command, "fstools") != 0) {
struct fstools_cmd cmd = get_command(command);
if (cmd.name)
return cmd.main_func(argc, argv);
}
return -1;
}