1/*- 2 * Copyright (c) 1993, John Brezak 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35static const char rcsid[] = |
36 "$FreeBSD: head/usr.bin/rup/rup.c 65428 2000-09-04 06:09:54Z imp $"; |
37#endif /* not lint */ 38 39#include <err.h> 40#include <stdio.h> 41#include <stdlib.h> 42#include <string.h> 43#include <time.h> 44#include <unistd.h> --- 158 unchanged lines hidden (view full) --- 203 fprintf(stderr, "usage: rup [hosts ...]\n"); 204 exit(1); 205} 206 207int 208main(int argc, char *argv[]) 209{ 210 int ch; |
211 212 while ((ch = getopt(argc, argv, "?")) != -1) 213 switch (ch) { 214 default: 215 usage(); 216 /*NOTREACHED*/ 217 } 218 219 setlinebuf(stdout); 220 if (argc == optind) 221 allhosts(); 222 else { 223 for (; optind < argc; optind++) 224 (void) onehost(argv[optind]); 225 } 226 exit(0); 227} |