summaryrefslogtreecommitdiffstats
path: root/ax25/axctl.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2015-05-02 00:19:09 +0200
committerRalf Baechle <ralf@linux-mips.org>2015-05-02 00:19:09 +0200
commit56e847dae8f585254c6b336ea557bd75a0574711 (patch)
tree7e775ea62e06caa505e7ad017e17bbc0800d8ab3 /ax25/axctl.c
parent62ceba5818d888041adbd466e8c67a8104bcf4fa (diff)
parent67d85b3d5cf145a5bf0a1431d6052473b017daa9 (diff)
Merge branch 'master' of git://git.linux-ax25.org/pub/scm/ralf/ax25-tools
Conflicts: ax25/axspawn.c
Diffstat (limited to 'ax25/axctl.c')
-rw-r--r--ax25/axctl.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ax25/axctl.c b/ax25/axctl.c
index 3186229..f1116a7 100644
--- a/ax25/axctl.c
+++ b/ax25/axctl.c
@@ -23,7 +23,7 @@ int main(int argc, char **argv)
struct ax25_ctl_struct ax25_ctl;
char *addr;
int s;
-
+
if (argc == 2 && strncmp(argv[1], "-v", 2) == 0) {
printf("axctl: %s\n", VERSION);
return 0;
@@ -50,7 +50,7 @@ int main(int argc, char **argv)
return 1;
if (ax25_aton_entry(argv[3], (char *)&ax25_ctl.source_addr) == -1)
return 1;
-
+
if ((s = socket(AF_AX25, SOCK_SEQPACKET, 0)) < 0) {
perror("axctl: socket");
return 1;
@@ -65,7 +65,7 @@ int main(int argc, char **argv)
return 1;
}
ax25_ctl.arg = atoi(argv[5]);
-
+
if (strcmp(argv[4], "t1") == 0 || strcmp(argv[4], "-t1") == 0)
ax25_ctl.cmd = AX25_T1;
else if (strcmp(argv[4], "t2") == 0 || strcmp(argv[4], "-t2") == 0)
@@ -83,12 +83,11 @@ int main(int argc, char **argv)
}
ax25_ctl.digi_count = 0;
-
+
if (ioctl(s, SIOCAX25CTLCON, &ax25_ctl) != 0) {
perror("axctl: SIOCAX25CTLCON");
return 1;
}
-
+
return 0;
}
-