summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2020-11-08 00:14:37 +0000
committerfishsoupisgood <github@madingley.org>2020-11-08 00:14:37 +0000
commit8531610431c4f0f60cbe64ed8ae362219e7f6520 (patch)
treedead8ef258b3726864d5d6ac664928f8baafc1dc
parent225c1b60f48c05057775e58f373beaf6dd65a3c7 (diff)
downloadgalaxy_sia-8531610431c4f0f60cbe64ed8ae362219e7f6520.tar.gz
galaxy_sia-8531610431c4f0f60cbe64ed8ae362219e7f6520.tar.bz2
galaxy_sia-8531610431c4f0f60cbe64ed8ae362219e7f6520.zip
make state return status
-rw-r--r--arm.c3
-rw-r--r--net_arm.c8
2 files changed, 4 insertions, 7 deletions
diff --git a/arm.c b/arm.c
index 9f994cc..7cfdd3f 100644
--- a/arm.c
+++ b/arm.c
@@ -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';
}
diff --git a/net_arm.c b/net_arm.c
index e2cd6db..310de09 100644
--- a/net_arm.c
+++ b/net_arm.c
@@ -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)