summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-11-27 03:49:14 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-11-27 03:49:14 +0000
commit66f1b8ee80b529add9096cdf0f48ab0471eb6510 (patch)
treee29dd93d0f925b6798aba3064d3bf28ec017bfdd
parentb8df2fd35a2b01942561791bb8404ec56bbfacc4 (diff)
re-enable config without arguments; fix usage
-rw-r--r--usr.sbin/config/config.822
-rw-r--r--usr.sbin/config/main.c8
2 files changed, 23 insertions, 7 deletions
diff --git a/usr.sbin/config/config.8 b/usr.sbin/config/config.8
index 7128b9054f4..2588327151f 100644
--- a/usr.sbin/config/config.8
+++ b/usr.sbin/config/config.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: config.8,v 1.13 1999/10/17 20:35:47 aaron Exp $
+.\" $OpenBSD: config.8,v 1.14 1999/11/27 03:49:13 d Exp $
.\" $NetBSD: config.8,v 1.10 1996/08/31 20:58:16 mycroft Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -45,9 +45,9 @@
.Op Fl b Ar builddir
.Op Fl s Ar srcdir
.Op Fl p
-.Ar config-file
+.Op Ar config-file
.Nm config
-.Op Fl e
+.Fl e
.Op Fl f | Fl o Ar outfile
.Op Fl u
.Ar infile
@@ -182,6 +182,22 @@ should be run again.
attempts to avoid changing the compilation directory if there are
configuration errors, but this code is not well-tested and some problems
(such as running out of disk space) are unrecoverable.
+.Pp
+If
+.Ar config-file
+is not specified,
+.Nm
+uses the current directory as the build directory, and looks in it for
+a file called
+.Pa CONFIG .
+If you run
+.Nm
+this way, you must specify the location of the top-level kernel source
+directory using the
+.Fl s
+option or by using the
+.Dq Li source
+directive at the beginning of the system configuration file.
.Ss Kernel modification
When
.Fl e
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c
index 70e7dd7a781..9555d2e68f9 100644
--- a/usr.sbin/config/main.c
+++ b/usr.sbin/config/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.18 1999/10/04 20:00:51 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.19 1999/11/27 03:49:13 d Exp $ */
/* $NetBSD: main.c,v 1.22 1997/02/02 21:12:33 thorpej Exp $ */
/*
@@ -90,9 +90,9 @@ usage()
{
extern char *__progname;
- fprintf(stderr, "usage: %s [-p] [-s srcdir] [-b builddir] sysname\n",
+ fprintf(stderr, "usage: %s [-p] [-s srcdir] [-b builddir] [sysname]\n",
__progname);
- fprintf(stderr, " %s -e [-u] [-o newkernel] kernel\n", __progname);
+ fprintf(stderr, " %s -e [-u] [-f | -o newkernel] kernel\n", __progname);
exit(1);
}
@@ -166,7 +166,7 @@ main(argc, argv)
argc -= optind;
argv += optind;
- if (argc > 1 || !argv[0])
+ if (argc > 1 || (eflag && argv[0] == NULL))
usage();
if (eflag)