diff options
author | fishsoupisgood <github@madingley.org> | 2020-11-08 00:14:37 +0000 |
---|---|---|
committer | fishsoupisgood <github@madingley.org> | 2020-11-08 00:14:37 +0000 |
commit | 8531610431c4f0f60cbe64ed8ae362219e7f6520 (patch) | |
tree | dead8ef258b3726864d5d6ac664928f8baafc1dc | |
parent | 225c1b60f48c05057775e58f373beaf6dd65a3c7 (diff) | |
download | galaxy_sia-8531610431c4f0f60cbe64ed8ae362219e7f6520.tar.gz galaxy_sia-8531610431c4f0f60cbe64ed8ae362219e7f6520.tar.bz2 galaxy_sia-8531610431c4f0f60cbe64ed8ae362219e7f6520.zip |
make state return status
-rw-r--r-- | arm.c | 3 | ||||
-rw-r--r-- | net_arm.c | 8 |
2 files changed, 4 insertions, 7 deletions
@@ -165,7 +165,8 @@ int show_state (int fd) printf ("%6d | %-15s | %-15s | %-15s\n", i + 1, armed_to_str (armed[i]), state_to_str (state[i]), ready_to_str (ready[i])); printf ("\n"); - return 0; + + return armed[0] - '0'; } @@ -109,12 +109,8 @@ int main (int argc, char *argv[]) - if (action == -1) { - if (show_state (fd)) - return -1; - - return 0; - } + if (action == -1) + return show_state (fd); if (zone != -1) |