Add support for dset'ing an arbitrary kernel (experimental).

This commit is contained in:
Jordan K. Hubbard 1996-10-01 14:42:36 +00:00
parent 8ac5386905
commit a38ec0017c
2 changed files with 19 additions and 9 deletions

View file

@ -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 .

View file

@ -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);