summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bootparamd
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 03:57:47 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 03:57:47 +0000
commit4f960dd75f181e9fa2edc44324f15f0ab5c64b37 (patch)
tree15a9c7203efd47ba6dde2896fdb6327dddd4547f /usr.sbin/bootparamd
parent30ef9631c5eac7f8254bd3d7ad274d34d9f518b8 (diff)
downloadFreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.zip
FreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'usr.sbin/bootparamd')
-rw-r--r--usr.sbin/bootparamd/bootparamd/Makefile4
-rw-r--r--usr.sbin/bootparamd/bootparamd/bootparamd.c42
-rw-r--r--usr.sbin/bootparamd/bootparamd/main.c10
-rw-r--r--usr.sbin/bootparamd/callbootd/Makefile6
-rw-r--r--usr.sbin/bootparamd/callbootd/callbootd.c42
5 files changed, 52 insertions, 52 deletions
diff --git a/usr.sbin/bootparamd/bootparamd/Makefile b/usr.sbin/bootparamd/bootparamd/Makefile
index 3d7e347..dd85c80 100644
--- a/usr.sbin/bootparamd/bootparamd/Makefile
+++ b/usr.sbin/bootparamd/bootparamd/Makefile
@@ -1,5 +1,5 @@
# from: @(#)Makefile 5.8 (Berkeley) 7/28/90
-# $Id: Makefile,v 1.3 1995/03/01 20:36:17 jkh Exp $
+# $Id: Makefile,v 1.4 1995/03/02 21:59:51 wpaul Exp $
PROG= bootparamd
SRCS= bootparam_prot_xdr.c bootparam_prot_svc.c bootparamd.c main.c
@@ -18,7 +18,7 @@ bootparam_prot_xdr.c: bootparam_prot.h
cp ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x .
rpcgen -c -o bootparam_prot_xdr.c bootparam_prot.x
-bootparam_prot.h:
+bootparam_prot.h:
rm -f bootparam_prot.x
cp ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x .
rpcgen -h -o bootparam_prot.h bootparam_prot.x
diff --git a/usr.sbin/bootparamd/bootparamd/bootparamd.c b/usr.sbin/bootparamd/bootparamd/bootparamd.c
index d91b053..ed088be 100644
--- a/usr.sbin/bootparamd/bootparamd/bootparamd.c
+++ b/usr.sbin/bootparamd/bootparamd/bootparamd.c
@@ -1,11 +1,11 @@
/*
-This code is not copyright, and is placed in the public domain. Feel free to
+This code is not copyright, and is placed in the public domain. Feel free to
use and modify. Please send modifications and/or suggestions + bug fixes to
Klas Heggemann <klas@nada.kth.se>
- $Id$
+ $Id: bootparamd.c,v 1.1.1.1 1995/02/26 23:40:52 wpaul Exp $
*/
@@ -31,34 +31,34 @@ static char askname[MAX_MACHINE_NAME];
static char path[MAX_PATH_LEN];
static char domain_name[MAX_MACHINE_NAME];
-
+
bp_whoami_res *
bootparamproc_whoami_1(whoami)
bp_whoami_arg *whoami;
{
long haddr;
static bp_whoami_res res;
- if (debug)
- fprintf(stderr,"whoami got question for %d.%d.%d.%d\n",
+ if (debug)
+ fprintf(stderr,"whoami got question for %d.%d.%d.%d\n",
255 & whoami->client_address.bp_address_u.ip_addr.net,
255 & whoami->client_address.bp_address_u.ip_addr.host,
255 & whoami->client_address.bp_address_u.ip_addr.lh,
255 & whoami->client_address.bp_address_u.ip_addr.impno);
- if (dolog)
- syslog(LOG_NOTICE, "whoami got question for %d.%d.%d.%d\n",
+ if (dolog)
+ syslog(LOG_NOTICE, "whoami got question for %d.%d.%d.%d\n",
255 & whoami->client_address.bp_address_u.ip_addr.net,
255 & whoami->client_address.bp_address_u.ip_addr.host,
255 & whoami->client_address.bp_address_u.ip_addr.lh,
255 & whoami->client_address.bp_address_u.ip_addr.impno);
- bcopy((char *)&whoami->client_address.bp_address_u.ip_addr, (char *)&haddr,
+ bcopy((char *)&whoami->client_address.bp_address_u.ip_addr, (char *)&haddr,
sizeof(haddr));
he = gethostbyaddr((char *)&haddr,sizeof(haddr),AF_INET);
if ( ! he ) goto failed;
if (debug) fprintf(stderr,"This is host %s\n", he->h_name);
if (dolog) syslog(LOG_NOTICE,"This is host %s\n", he->h_name);
-
+
strcpy(askname, he->h_name);
if (checkhost(askname, hostname) ) {
res.client_name = hostname;
@@ -70,7 +70,7 @@ bp_whoami_arg *whoami;
bcopy( &route_addr, &res.router_address.bp_address_u.ip_addr, 4);
}
if (debug) fprintf(stderr,
- "Returning %s %s %d.%d.%d.%d\n",
+ "Returning %s %s %d.%d.%d.%d\n",
res.client_name,
res.domain_name,
255 & res.router_address.bp_address_u.ip_addr.net,
@@ -78,7 +78,7 @@ bp_whoami_arg *whoami;
255 & res.router_address.bp_address_u.ip_addr.lh,
255 & res.router_address.bp_address_u.ip_addr.impno);
if (dolog) syslog(LOG_NOTICE,
- "Returning %s %s %d.%d.%d.%d\n",
+ "Returning %s %s %d.%d.%d.%d\n",
res.client_name,
res.domain_name,
255 & res.router_address.bp_address_u.ip_addr.net,
@@ -102,11 +102,11 @@ bp_getfile_arg *getfile;
char *where, *index();
static bp_getfile_res res;
- if (debug)
+ if (debug)
fprintf(stderr,"getfile got question for \"%s\" and file \"%s\"\n",
getfile->client_name, getfile->file_id);
- if (dolog)
+ if (dolog)
syslog(LOG_NOTICE,"getfile got question for \"%s\" and file \"%s\"\n",
getfile->client_name, getfile->file_id);
@@ -137,14 +137,14 @@ bp_getfile_arg *getfile;
bzero(&res.server_address.bp_address_u.ip_addr,4);
} else goto failed;
}
- if (debug)
+ if (debug)
fprintf(stderr, "returning server:%s path:%s address: %d.%d.%d.%d\n",
res.server_name, res.server_path,
255 & res.server_address.bp_address_u.ip_addr.net,
255 & res.server_address.bp_address_u.ip_addr.host,
255 & res.server_address.bp_address_u.ip_addr.lh,
255 & res.server_address.bp_address_u.ip_addr.impno);
- if (dolog)
+ if (dolog)
syslog(LOG_NOTICE, "returning server:%s path:%s address: %d.%d.%d.%d\n",
res.server_name, res.server_path,
255 & res.server_address.bp_address_u.ip_addr.net,
@@ -155,14 +155,14 @@ bp_getfile_arg *getfile;
}
failed:
if (debug) fprintf(stderr, "getfile failed for %s\n", getfile->client_name);
- if (dolog) syslog(LOG_NOTICE,
+ if (dolog) syslog(LOG_NOTICE,
"getfile failed for %s\n", getfile->client_name);
return(NULL);
}
/* getthefile return 1 and fills the buffer with the information
of the file, e g "host:/export/root/client" if it can be found.
- If the host is in the database, but the file is not, the buffer
+ If the host is in the database, but the file is not, the buffer
will be empty. (This makes it possible to give the special
empty answer for the file "dump") */
@@ -218,7 +218,7 @@ char *fileid, *buffer;
}
/* skip to next entry */
if ( match ) break;
- pch = ch = getc(bpf);
+ pch = ch = getc(bpf);
while ( ! ( ch == '\n' && pch != '\\') && ch != EOF) {
pch = ch; ch = getc(bpf);
}
@@ -238,8 +238,8 @@ char *fileid, *buffer;
strcpy(buffer, where); /* found file */
res = 1; break;
}
- } else {
- while (isspace(ch) && ch != '\n') ch = getc(bpf);
+ } else {
+ while (isspace(ch) && ch != '\n') ch = getc(bpf);
/* read to end of line */
if ( ch == '\n' ) { /* didn't find it */
res = -1; break; /* but host is there */
@@ -319,7 +319,7 @@ char *hostname;
return(res);
}
/* skip to next entry */
- pch = ch = getc(bpf);
+ pch = ch = getc(bpf);
while ( ! ( ch == '\n' && pch != '\\') && ch != EOF) {
pch = ch; ch = getc(bpf);
}
diff --git a/usr.sbin/bootparamd/bootparamd/main.c b/usr.sbin/bootparamd/bootparamd/main.c
index 70381c8..1e3d30f 100644
--- a/usr.sbin/bootparamd/bootparamd/main.c
+++ b/usr.sbin/bootparamd/bootparamd/main.c
@@ -1,12 +1,12 @@
/*
-This code is not copyright, and is placed in the public domain. Feel free to
+This code is not copyright, and is placed in the public domain. Feel free to
use and modify. Please send modifications and/or suggestions + bug fixes to
Klas Heggemann <klas@nada.kth.se>
- $Id$
+ $Id: main.c,v 1.1.1.1 1995/02/26 23:40:52 wpaul Exp $
*/
@@ -73,7 +73,7 @@ char **argv;
break;
case 's':
dolog = 1;
-#ifndef LOG_DAEMON
+#ifndef LOG_DAEMON
openlog(progname, 0 , 0);
#else
openlog(progname, 0 , LOG_DAEMON);
@@ -81,7 +81,7 @@ char **argv;
#endif
break;
default:
- fprintf(stderr,
+ fprintf(stderr,
"Usage: %s [-d ] [ -s ] [ -r router ] [ -f bootparmsfile ]\n");
exit(1);
}
@@ -117,7 +117,7 @@ char **argv;
close(s);
}
}
-
+
(void)pmap_unset(BOOTPARAMPROG, BOOTPARAMVERS);
diff --git a/usr.sbin/bootparamd/callbootd/Makefile b/usr.sbin/bootparamd/callbootd/Makefile
index 61ed118..bc44761 100644
--- a/usr.sbin/bootparamd/callbootd/Makefile
+++ b/usr.sbin/bootparamd/callbootd/Makefile
@@ -1,9 +1,9 @@
# from: @(#)Makefile 5.8 (Berkeley) 7/28/90
-# $Id: Makefile,v 1.3 1995/03/01 20:36:20 jkh Exp $
+# $Id: Makefile,v 1.4 1995/03/02 22:00:33 wpaul Exp $
PROG= callbootd
SRCS= bootparam_prot_xdr.c bootparam_prot_clnt.c callbootd.c
-NOMAN=
+NOMAN=
CFLAGS+= -I.
CLEANFILES= bootparam_prot_clnt.c bootparam_prot_xdr.c \
bootparam_prot.h bootparam_prot.x
@@ -18,7 +18,7 @@ bootparam_prot_xdr.c: bootparam_prot.h
cp ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x .
rpcgen -c -o bootparam_prot_xdr.c bootparam_prot.x
-bootparam_prot.h:
+bootparam_prot.h:
rm -f bootparam_prot.x
cp ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x .
rpcgen -h -o bootparam_prot.h bootparam_prot.x
diff --git a/usr.sbin/bootparamd/callbootd/callbootd.c b/usr.sbin/bootparamd/callbootd/callbootd.c
index 421bb3c..18cfac3 100644
--- a/usr.sbin/bootparamd/callbootd/callbootd.c
+++ b/usr.sbin/bootparamd/callbootd/callbootd.c
@@ -1,11 +1,11 @@
/*
-This code is not copyright, and is placed in the public domain. Feel free to
+This code is not copyright, and is placed in the public domain. Feel free to
use and modify. Please send modifications and/or suggestions + bug fixes to
Klas Heggemann <klas@nada.kth.se>
- $Id: callbootd.c,v 1.1.1.1 1995/02/26 23:40:53 wpaul Exp $
+ $Id: callbootd.c,v 1.2 1995/03/26 03:15:39 wpaul Exp $
*/
@@ -59,13 +59,13 @@ char **argv;
{
int stat;
char *server;
-
+
bp_whoami_arg whoami_arg;
bp_whoami_res *whoami_res, stat_whoami_res;
bp_getfile_arg getfile_arg;
bp_getfile_res *getfile_res, stat_getfile_res;
-
+
long the_inet_addr;
CLIENT *clnt;
enum clnt_stat clnt_stat;
@@ -75,20 +75,20 @@ char **argv;
stat_getfile_res.server_name = cln;
stat_getfile_res.server_path = path;
-
+
if (argc < 3) {
fprintf(stderr,
"Usage: %s server procnum (IP-addr | host fileid)\n", argv[0]);
exit(1);
- }
+ }
+
-
server = argv[1];
if ( ! strcmp(server , "all") ) broadcast = 1;
-
+
if ( ! broadcast ) {
clnt = clnt_create(server,BOOTPARAMPROG, BOOTPARAMVERS, "udp");
- }
+ }
if ( clnt == NULL ) {
fprintf (stderr, "%s: could not contact bootparam server on host %s\n",
@@ -115,9 +115,9 @@ char **argv;
} else
exit(0);
} else {
- clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
+ clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
BOOTPARAMPROC_WHOAMI,
- xdr_bp_whoami_arg, &whoami_arg,
+ xdr_bp_whoami_arg, &whoami_arg,
xdr_bp_whoami_res, &stat_whoami_res, eachres_whoami);
exit(0);
}
@@ -126,7 +126,7 @@ char **argv;
getfile_arg.client_name = argv[2];
getfile_arg.file_id = argv[3];
-
+
if (! broadcast ) {
getfile_res = bootparamproc_getfile_1(&getfile_arg,clnt);
printf("getfile returning:\n");
@@ -134,26 +134,26 @@ char **argv;
fprintf(stderr, "Bad answer returned from server %s\n", server);
exit(1);
} else
- exit(0);
+ exit(0);
} else {
- clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
+ clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
BOOTPARAMPROC_GETFILE,
- xdr_bp_getfile_arg, &getfile_arg,
+ xdr_bp_getfile_arg, &getfile_arg,
xdr_bp_getfile_res, &stat_getfile_res,eachres_getfile);
exit(0);
}
-
+
default:
-
+
fprintf(stderr,
"Usage: %s server procnum (IP-addr | host fileid)\n", argv[0]);
exit(1);
}
-
+
}
-
+
int printwhoami(res)
bp_whoami_res *res;
{
@@ -171,7 +171,7 @@ bp_whoami_res *res;
return(1);
}
}
-
+
@@ -181,7 +181,7 @@ bp_getfile_res *res;
{
if (res) {
printf("server_name:\t%s\nserver_address:\t%s\npath:\t%s\n",
- res->server_name,
+ res->server_name,
inet_ntoa(res->server_address.bp_address_u.ip_addr),
res->server_path);
return(0);
OpenPOWER on IntegriCloud