#include #include #include #include #include #include #include #include #include const char *device_root = "./"; void mission(void); int get_descriptor_rw() { return 1; } void done() { printf("done.\n"); exit(0); } int test_socket(); // Don't ask me, it makes the linker happy and does not seem // to break anything ¯\_(ツ)_/¯ void rust_eh_personality() { puts("eh_personality"); } int main(int argc, char **argv) { static struct option long_options[] = { /* NAME ARGUMENT FLAG SHORTNAME */ {"device-root", required_argument, NULL, 'd'}, {"help", no_argument, NULL, 'h'}, {NULL, 0, NULL, 0}}; int c; int option_index = 0; while ((c = getopt_long(argc, argv, "hd:", long_options, &option_index)) != -1) { switch (c) { case 'd': if (optarg != NULL) { device_root = optarg; break; default: fprintf(stderr, "Usage: %s -d device-root\n", argv[0]); exit(EXIT_FAILURE); } } } mission(); return 0; }