aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/spppcontrol
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>1998-01-05 07:23:02 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>1998-01-05 07:23:02 +0000
commit2632a83f1ed43dbefd76dc70994faac870ff1ea5 (patch)
tree9f461336438c55ea0dc087c67eb8b50c87ad4548 /sbin/spppcontrol
parentcfebbb6c1a01f867a1ab9c277cb3d3c1d3df97a9 (diff)
downloadsrc-2632a83f1ed43dbefd76dc70994faac870ff1ea5.tar.gz
src-2632a83f1ed43dbefd76dc70994faac870ff1ea5.zip
Add rcsid. Remove uneeded #include. Use fprintf() in usage() instead of err(3)
to make it print: usage: progname ...
Notes
Notes: svn path=/head/; revision=32274
Diffstat (limited to 'sbin/spppcontrol')
-rw-r--r--sbin/spppcontrol/spppcontrol.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sbin/spppcontrol/spppcontrol.c b/sbin/spppcontrol/spppcontrol.c
index f961ae6674c0..99709889f480 100644
--- a/sbin/spppcontrol/spppcontrol.c
+++ b/sbin/spppcontrol/spppcontrol.c
@@ -22,10 +22,13 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
*/
+#ifndef lint
+static const char rcsid[] =
+ "$Id$";
+#endif /* not lint */
+
#include <sys/param.h>
#include <sys/callout.h>
#include <sys/ioctl.h>
@@ -37,7 +40,6 @@
#include <net/if_sppp.h>
#include <err.h>
-#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -45,7 +47,7 @@
#include <sysexits.h>
#include <unistd.h>
-void usage(void);
+static void usage(void);
void print_vals(const char *ifname, struct spppreq *sp);
const char *phase_name(enum ppp_phase phase);
const char *proto_name(u_short proto);
@@ -178,12 +180,13 @@ main(int argc, char **argv)
return 0;
}
-void
+static void
usage(void)
{
- errx(EX_USAGE,
- "usage: [-v] ifname [{my|his}auth{proto|name|secret}=..."
- "|callin|always]");
+ fprintf(stderr, "%s\n%s\n",
+ "usage: spppcontrol [-v] ifname [{my|his}auth{proto|name|secret}=...]",
+ " spppcontrol [-v] ifname callin|always");
+ exit(EX_USAGE);
}
void