forked from ROMEO/fsw-ws
big box of fixes and cleanup
This commit is contained in:
@@ -40,8 +40,6 @@ const char *get_port_number(const char *path, size_t path_len) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int hw_device_open(const char *path, size_t path_len) {
|
||||
|
||||
int serial_fd = serial_open(path, path_len);
|
||||
|
||||
+11
-11
@@ -14,25 +14,26 @@ int ai_family = AF_UNSPEC;
|
||||
|
||||
void mission(void);
|
||||
|
||||
void done() { exit(0); }
|
||||
|
||||
void done() {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void done_error() {
|
||||
exit(1);
|
||||
}
|
||||
void done_error() { exit(1); }
|
||||
|
||||
int test_socket();
|
||||
|
||||
// TODO link to GCC's personality or make the linux build not use it?
|
||||
void rust_eh_personality() { puts("eh_personality"); }
|
||||
|
||||
void print_usage(const char * name) {
|
||||
fprintf(stderr, "Usage: %s [-s sim_ip] [-4|6]\n", name);
|
||||
void print_usage(const char *name) {
|
||||
fprintf(stderr, "Usage: %s [-s sim_ip] [-4|6]\n", name);
|
||||
}
|
||||
|
||||
#include <hardware/interfaces.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
hw_device_open(
|
||||
"invalidpath",
|
||||
11); // TODO for some weird linker behaviour, if this function is not used
|
||||
// here, it will not be found by the linker when linking the rust lib
|
||||
static struct option long_options[] = {
|
||||
/* NAME ARGUMENT FLAG SHORTNAME */
|
||||
{"sim_ip", required_argument, NULL, 's'},
|
||||
@@ -58,9 +59,8 @@ int main(int argc, char **argv) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mission();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user