summaryrefslogtreecommitdiffstats
path: root/rose
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-06-05 00:57:38 +0200
committerRalf Baechle <ralf@linux-mips.org>2013-06-17 17:11:30 +0200
commit1245fbd2a8d60bab7b16b8a1d3c0122fee72f53f (patch)
tree6dcf938b1472a9b5cac35648ffb0f3d185c39590 /rose
parent0b4425760be1f92a1f25daeb5d3dc91814a98622 (diff)
Nuke trailing whitespace.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'rose')
-rw-r--r--rose/Makefile.am6
-rw-r--r--rose/rose.42
-rw-r--r--rose/rsattach.c40
-rw-r--r--rose/rsdwnlnk.82
-rw-r--r--rose/rsdwnlnk.c10
-rw-r--r--rose/rsmemsiz.c10
-rw-r--r--rose/rsparms.c8
-rw-r--r--rose/rsuplnk.c4
8 files changed, 41 insertions, 41 deletions
diff --git a/rose/Makefile.am b/rose/Makefile.am
index 1729e9a..2a2e95b 100644
--- a/rose/Makefile.am
+++ b/rose/Makefile.am
@@ -1,9 +1,9 @@
-sbin_PROGRAMS = rsattach rsdwnlnk rsmemsiz rsparms rsuplnk
+sbin_PROGRAMS = rsattach rsdwnlnk rsmemsiz rsparms rsuplnk
LDADD = $(AX25_LIB)
-rsmemsiz_LDADD =
+rsmemsiz_LDADD =
sbin_SCRIPTS = rsusers.sh
@@ -13,7 +13,7 @@ dist_man_MANS = rose.4 rsattach.8 rsparms.8 rsdwnlnk.8 rsuplnk.8
EXTRA_DIST = $(sbin_SCRIPTS)
INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
- -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\"
+ -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\"
AX25_SYSCONFDIR=${sysconfdir}/ax25/
AX25_LOCALSTATEDIR=${localstatedir}/ax25/
diff --git a/rose/rose.4 b/rose/rose.4
index a06f324..7904017 100644
--- a/rose/rose.4
+++ b/rose/rose.4
@@ -24,7 +24,7 @@ Rose has some unusual properties. Notably in a multi-user system an AX.25
address is often associated with a user, and some users may not have such an
association. a set of ioctl calls are provided to manage an association
table.
-.LP
+.LP
Rose supports the following socket options for SOL_ROSE. ROSE_T1 is the
T11/T21 timer in 1/10ths of a second, ROSE_T2 is the T12/T22 timer in
1/10ths of a second. ROSE_T3, is the T13/T23 timer in 1/10ths of a second.
diff --git a/rose/rsattach.c b/rose/rsattach.c
index 924d152..62892d8 100644
--- a/rose/rsattach.c
+++ b/rose/rsattach.c
@@ -35,7 +35,7 @@ int readconfig(char *port)
FILE *fp;
char buffer[90], *s;
int n = 0;
-
+
if ((fp = fopen(CONF_RSPORTS_FILE, "r")) == NULL) {
fprintf(stderr, "rsattach: cannot open rsports file\n");
return FALSE;
@@ -43,7 +43,7 @@ int readconfig(char *port)
while (fgets(buffer, 90, fp) != NULL) {
n++;
-
+
if ((s = strchr(buffer, '\n')) != NULL)
*s = '\0';
@@ -54,10 +54,10 @@ int readconfig(char *port)
fprintf(stderr, "rsattach: unable to parse line %d of the rsports file\n", n);
return FALSE;
}
-
+
if (strcmp(s, port) != 0)
continue;
-
+
if ((s = strtok(NULL, " \t\r\n")) == NULL) {
fprintf(stderr, "rsattach: unable to parse line %d of the rsports file\n", n);
return FALSE;
@@ -66,14 +66,14 @@ int readconfig(char *port)
address = strdup(s);
fclose(fp);
-
+
return TRUE;
}
-
+
fclose(fp);
fprintf(stderr, "rsattach: cannot find port %s in rsports\n", port);
-
+
return FALSE;
}
@@ -82,7 +82,7 @@ int getfreedev(char *dev)
struct ifreq ifr;
int fd;
int i;
-
+
if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
perror("rsattach: socket");
return FALSE;
@@ -91,7 +91,7 @@ int getfreedev(char *dev)
for (i = 0; i < 6; i++) {
sprintf(dev, "rose%d", i);
strcpy(ifr.ifr_name, dev);
-
+
if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
perror("rsattach: SIOCGIFFLAGS");
return FALSE;
@@ -113,17 +113,17 @@ int startiface(char *dev, struct hostent *hp)
struct ifreq ifr;
char addr[5];
int fd;
-
+
if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
perror("rsattach: socket");
return FALSE;
}
strcpy(ifr.ifr_name, dev);
-
+
if (hp != NULL) {
ifr.ifr_addr.sa_family = AF_INET;
-
+
ifr.ifr_addr.sa_data[0] = 0;
ifr.ifr_addr.sa_data[1] = 0;
ifr.ifr_addr.sa_data[2] = hp->h_addr_list[0][0];
@@ -143,7 +143,7 @@ int startiface(char *dev, struct hostent *hp)
ifr.ifr_hwaddr.sa_family = ARPHRD_ROSE;
memcpy(ifr.ifr_hwaddr.sa_data, addr, 5);
-
+
if (ioctl(fd, SIOCSIFHWADDR, &ifr) != 0) {
perror("rsattach: SIOCSIFHWADDR");
return FALSE;
@@ -169,12 +169,12 @@ int startiface(char *dev, struct hostent *hp)
perror("rsattach: SIOCSIFFLAGS");
return FALSE;
}
-
+
close(fd);
-
+
return TRUE;
}
-
+
int main(int argc, char *argv[])
{
@@ -199,7 +199,7 @@ int main(int argc, char *argv[])
return 1;
}
}
-
+
if ((argc - optind) != 1) {
fprintf(stderr, "usage: rsattach [-i inetaddr] [-v] port\n");
return 1;
@@ -212,11 +212,11 @@ int main(int argc, char *argv[])
fprintf(stderr, "rsattach: cannot find free Rose device\n");
return 1;
}
-
+
if (!startiface(dev, hp))
- return 1;
+ return 1;
printf("Rose port %s bound to device %s\n", argv[optind], dev);
-
+
return 0;
}
diff --git a/rose/rsdwnlnk.8 b/rose/rsdwnlnk.8
index f0d4c2d..db1a601 100644
--- a/rose/rsdwnlnk.8
+++ b/rose/rsdwnlnk.8
@@ -23,7 +23,7 @@ you need an entry in
to listen for incoming ROSE connections to any callsigns that are not
matched by the more specific ROSE entries. In the example below, I will be
listening for ROSE connections on my ROSE port rs144, the exiting AX.25
-connection will be via the associated AX.25 port, 144, using the callsign
+connection will be via the associated AX.25 port, 144, using the callsign
KE4GAJ-10. Please note that the callsign should be on the same line as the
rest of the command, it may be wrapped onto the next line on your screen.
.LP
diff --git a/rose/rsdwnlnk.c b/rose/rsdwnlnk.c
index 9ff6f31..8c7bb08 100644
--- a/rose/rsdwnlnk.c
+++ b/rose/rsdwnlnk.c
@@ -114,7 +114,7 @@ int main(int argc, char **argv)
return 1;
}
axconnect.fsa_digipeater[n].ax25_call[6] |= AX25_HBIT;
- n++;
+ n++;
}
/*
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
return 1;
}
axconnect.fsa_digipeater[n].ax25_call[6] |= AX25_HBIT;
- n++;
+ n++;
/*
* And my local ROSE callsign.
@@ -215,9 +215,9 @@ int main(int argc, char **argv)
close(s);
write(STDOUT_FILENO, buffer, strlen(buffer));
-
+
sleep(20);
-
+
return 0;
}
@@ -236,7 +236,7 @@ int main(int argc, char **argv)
FD_ZERO(&read_fd);
FD_SET(STDIN_FILENO, &read_fd);
FD_SET(s, &read_fd);
-
+
select(s + 1, &read_fd, NULL, NULL, NULL);
if (FD_ISSET(s, &read_fd)) {
diff --git a/rose/rsmemsiz.c b/rose/rsmemsiz.c
index c71737c..bdddb45 100644
--- a/rose/rsmemsiz.c
+++ b/rose/rsmemsiz.c
@@ -54,7 +54,7 @@ static char buf[300];
int uptime(double *uptime_secs, double *idle_secs) {
double up=0, idle=0;
-
+
FILE_TO_BUF(UPTIME_FILE)
if (sscanf(buf, "%lf %lf", &up, &idle) < 2) {
fprintf(stdout, "ERROR: Bad data in %s\r", UPTIME_FILE);
@@ -67,7 +67,7 @@ int uptime(double *uptime_secs, double *idle_secs) {
int loadavg(double *av1, double *av5, double *av15) {
double avg_1=0, avg_5=0, avg_15=0;
-
+
FILE_TO_BUF(LOADAVG_FILE)
if (sscanf(buf, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3) {
fprintf(stdout, "ERROR: Bad data in %s\r", LOADAVG_FILE);
@@ -83,7 +83,7 @@ int loadavg(double *av1, double *av5, double *av15) {
[ <label> ... ] # header lines
[ <label> ] <num> [ <num> ... ] # table rows
[ repeats of above line ]
-
+
Any lines with fewer <num>s than <label>s get trailing <num>s set to zero.
The return value is a NULL terminated unsigned** which is the table of
numbers without labels. Convenient enumeration constants for the major and
@@ -100,7 +100,7 @@ unsigned** meminfo(void) {
static unsigned num[MAX_ROW * MAX_COL]; /* number storage */
char *p;
int i, j, k, l;
-
+
FILE_TO_BUF(MEMINFO_FILE)
if (!row[0]) /* init ptrs 1st time through */
for (i=0; i < MAX_ROW; i++) /* std column major order: */
@@ -124,7 +124,7 @@ unsigned** meminfo(void) {
/*
- * by Heikki Hannikainen <oh7lzb@sral.fi>
+ * by Heikki Hannikainen <oh7lzb@sral.fi>
* The following was mostly learnt from the procps package and the
* gnu sh-utils (mainly uname).
*/
diff --git a/rose/rsparms.c b/rose/rsparms.c
index 4de807e..a0c4786 100644
--- a/rose/rsparms.c
+++ b/rose/rsparms.c
@@ -197,7 +197,7 @@ int main(int argc, char *argv[])
{
ax25_address rose_call;
int s = 0;
-
+
if (argc == 1) {
fprintf(stderr, "usage: rsparms -call|-nodes|-version ...\n");
return 1;
@@ -227,7 +227,7 @@ int main(int argc, char *argv[])
perror("rsparms: socket");
return 1;
}
-
+
if (ioctl(s, SIOCRSL2CALL, &rose_call) == -1) {
perror("rsparms: ioctl");
close(s);
@@ -251,8 +251,8 @@ int main(int argc, char *argv[])
}
fprintf(stderr, "usage: rsparms -call|-nodes|-version ...\n");
-
+
close(s);
-
+
return 1;
}
diff --git a/rose/rsuplnk.c b/rose/rsuplnk.c
index eadb0ed..5d9be33 100644
--- a/rose/rsuplnk.c
+++ b/rose/rsuplnk.c
@@ -102,7 +102,7 @@ int main(int argc, char **argv)
for (n = 0; n < ax25peer.fsa_ax25.sax25_ndigis; n++) {
addr = ax25_ntoa(&ax25peer.fsa_digipeater[n]);
-
+
if (strspn(addr, "0123456789-") == strlen(addr)) {
if ((p = strchr(addr, '-')) != NULL)
*p = '\0';
@@ -249,7 +249,7 @@ int main(int argc, char **argv)
FD_ZERO(&read_fd);
FD_SET(STDIN_FILENO, &read_fd);
FD_SET(s, &read_fd);
-
+
select(s + 1, &read_fd, NULL, NULL, NULL);
if (FD_ISSET(s, &read_fd)) {