summaryrefslogtreecommitdiffstats
path: root/sbin/dset
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-10-01 14:42:36 +0000
committerjkh <jkh@FreeBSD.org>1996-10-01 14:42:36 +0000
commit3d87a6008918018567d0a6c5d9c5ab28f034a59a (patch)
treed40b4a27ef635e9d9fdb7a597de2712ef7de482b /sbin/dset
parentc5c045e53840d59d1471900c5cd3ea8cf3fb78bf (diff)
downloadFreeBSD-src-3d87a6008918018567d0a6c5d9c5ab28f034a59a.zip
FreeBSD-src-3d87a6008918018567d0a6c5d9c5ab28f034a59a.tar.gz
Add support for dset'ing an arbitrary kernel (experimental).
Diffstat (limited to 'sbin/dset')
-rw-r--r--sbin/dset/dset.813
-rw-r--r--sbin/dset/dset.c15
2 files changed, 19 insertions, 9 deletions
diff --git a/sbin/dset/dset.8 b/sbin/dset/dset.8
index c1aa5e9..998dcc1 100644
--- a/sbin/dset/dset.8
+++ b/sbin/dset/dset.8
@@ -23,7 +23,7 @@
.\" (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: dset.8,v 1.1 1996/05/02 21:47:45 joerg Exp $
+.\" $Id: dset.8,v 1.2 1996/05/02 22:34:19 mpp Exp $
.\" "
.Dd May 2, 1996
.Dt DSET 8
@@ -34,16 +34,19 @@
.Sh SYNOPSIS
.Nm dset
.Op Fl vqt
+.Op Fl k Ar kernel
.Sh DESCRIPTION
.Nm Dset
records the configuration changes for ISA devices that have been made
-from within
+from
.Em UserConfig
after booting with the
.Fl c
-option. The changes (if any) are always attempted to be recorded into
-the file as obtained by
-.Xr getbootfile 3 .
+option. The changes (if any) are recorded to the file name returned by
+.Xr getbootfile 3
+unless overridden with the
+.Fl k
+flag.
.Nm Dset
is typically called from within
.Pa /etc/rc .
diff --git a/sbin/dset/dset.c b/sbin/dset/dset.c
index 22145d8..3c70d1d 100644
--- a/sbin/dset/dset.c
+++ b/sbin/dset/dset.c
@@ -83,7 +83,7 @@ error(name, str)
void
usage(char *title)
{
- fprintf(stderr, "usage: %s [-qtv]\n", title);
+ fprintf(stderr, "usage: %s [-qtv] [-k kernel]\n", title);
}
main(ac, av)
@@ -102,14 +102,14 @@ main(ac, av)
struct exec es;
kvm_t *kd;
static char errb[_POSIX2_LINE_MAX];
- const char *kernel;
+ const char *kernel = NULL;
extern char *optarg;
char ch;
int testonly = FALSE;
int verbose = FALSE;
- while ((ch = getopt(ac, av, "qtv")) != EOF)
+ while ((ch = getopt(ac, av, "qtvk:")) != EOF)
switch (ch) {
case 'q':
quiet = TRUE;
@@ -117,9 +117,15 @@ main(ac, av)
case 't':
testonly = TRUE;
/* In test mode we want to be verbose */
+
+ case 'k':
+ kernel = optarg;
+ break;
+
case 'v':
verbose = TRUE;
break;
+
case '?':
default:
usage(av[0]);
@@ -127,7 +133,8 @@ main(ac, av)
}
- kernel = getbootfile();
+ if (!kernel)
+ kernel = getbootfile();
if (verbose)
printf("Boot image: %s\n", kernel);
OpenPOWER on IntegriCloud