Module Name: src Committed By: maya Date: Mon Oct 2 10:08:11 UTC 2017
Modified Files: src/sbin/ping: ping.c Log Message: un-ifdef sgi. NFC To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sbin/ping/ping.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/ping/ping.c diff -u src/sbin/ping/ping.c:1.116 src/sbin/ping/ping.c:1.117 --- src/sbin/ping/ping.c:1.116 Fri Mar 17 06:52:59 2017 +++ src/sbin/ping/ping.c Mon Oct 2 10:08:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ping.c,v 1.116 2017/03/17 06:52:59 ryo Exp $ */ +/* $NetBSD: ping.c,v 1.117 2017/10/02 10:08:11 maya Exp $ */ /* * Copyright (c) 1989, 1993 @@ -58,7 +58,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: ping.c,v 1.116 2017/03/17 06:52:59 ryo Exp $"); +__RCSID("$NetBSD: ping.c,v 1.117 2017/10/02 10:08:11 maya Exp $"); #endif #include <stdio.h> @@ -451,7 +451,6 @@ main(int argc, char *argv[]) if (interval == 0) interval = (pingflags & F_FLOOD) ? FLOOD_INTVL : 1.0; -#ifndef sgi if (pingflags & F_FLOOD && prog_getuid()) errx(EXIT_FAILURE, "Must be superuser to use -f"); if (interval < 1.0 && prog_getuid()) @@ -459,7 +458,7 @@ main(int argc, char *argv[]) "ping interval"); if (preload > 0 && prog_getuid()) errx(EXIT_FAILURE, "Must be superuser to use -l"); -#endif + sec_to_timespec(interval, &interval_tv); if (interval_tv.tv_sec == 0 && interval_tv.tv_nsec == 0) { errx(EXIT_FAILURE, "Packet interval must be at least 1 ns"); @@ -1292,22 +1291,6 @@ pr_pack(u_char *buf, PR_PACK_SUB(); (void)printf("\nNOP"); break; -#ifdef sgi - case IPOPT_SECURITY: /* RFC 1108 RIPSO BSO */ - case IPOPT_ESO: /* RFC 1108 RIPSO ESO */ - case IPOPT_CIPSO: /* Commercial IPSO */ - if ((sysconf(_SC_IP_SECOPTS)) > 0) { - i = (unsigned)cp[1]; - hlen -= i - 1; - PR_PACK_SUB(); - (void)printf("\nSEC:"); - while (i--) { - (void)printf(" %02x", *cp++); - } - cp--; - break; - } -#endif default: PR_PACK_SUB(); (void)printf("\nunknown option 0x%x", *cp);