Index: stable/9/usr.sbin/bootparamd/bootparamd/main.c =================================================================== --- stable/9/usr.sbin/bootparamd/bootparamd/main.c (revision 291042) +++ stable/9/usr.sbin/bootparamd/bootparamd/main.c (revision 291043) @@ -1,118 +1,115 @@ /* 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 */ #ifndef lint static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "bootparam_prot.h" int debug = 0; int dolog = 0; in_addr_t route_addr = -1; struct sockaddr_in my_addr; char *bootpfile = "/etc/bootparams"; -extern void bootparamprog_1(); static void usage(void); int -main(argc, argv) -int argc; -char **argv; +main(int argc, char **argv) { SVCXPRT *transp; struct hostent *he; struct stat buf; int c; while ((c = getopt(argc, argv,"dsr:f:")) != -1) switch (c) { case 'd': debug = 1; break; case 'r': if (isdigit((unsigned char)*optarg)) { route_addr = inet_addr(optarg); break; } else { he = gethostbyname(optarg); if (he) { bcopy(he->h_addr, (char *)&route_addr, sizeof(route_addr)); break; } else { errx(1, "no such host %s", optarg); } } case 'f': bootpfile = optarg; break; case 's': dolog = 1; #ifndef LOG_DAEMON openlog("bootparamd", 0 , 0); #else openlog("bootparamd", 0 , LOG_DAEMON); setlogmask(LOG_UPTO(LOG_NOTICE)); #endif break; default: usage(); } if ( stat(bootpfile, &buf ) ) err(1, "%s", bootpfile); if (route_addr == -1) { get_myaddress(&my_addr); bcopy(&my_addr.sin_addr.s_addr, &route_addr, sizeof (route_addr)); } if (!debug) { if (daemon(0,0)) err(1, "fork"); } (void)pmap_unset(BOOTPARAMPROG, BOOTPARAMVERS); transp = svcudp_create(RPC_ANYSOCK); if (transp == NULL) errx(1, "cannot create udp service"); if (!svc_register(transp, BOOTPARAMPROG, BOOTPARAMVERS, bootparamprog_1, IPPROTO_UDP)) errx(1, "unable to register (BOOTPARAMPROG, BOOTPARAMVERS, udp)"); svc_run(); errx(1, "svc_run returned"); } static void -usage() +usage(void) { fprintf(stderr, "usage: bootparamd [-d] [-s] [-r router] [-f bootparmsfile]\n"); exit(1); } Index: stable/9/usr.sbin/bootparamd =================================================================== --- stable/9/usr.sbin/bootparamd (revision 291042) +++ stable/9/usr.sbin/bootparamd (revision 291043) Property changes on: stable/9/usr.sbin/bootparamd ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /stable/10/usr.sbin/bootparamd:r291042 Index: stable/9/usr.sbin =================================================================== --- stable/9/usr.sbin (revision 291042) +++ stable/9/usr.sbin (revision 291043) Property changes on: stable/9/usr.sbin ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /stable/10/usr.sbin:r291042 Index: stable/9 =================================================================== --- stable/9 (revision 291042) +++ stable/9 (revision 291043) Property changes on: stable/9 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,2 ## Merged /head:r290645 Merged /stable/10:r291042