Module Name: src
Committed By: martin
Date: Wed Feb 19 21:51:21 UTC 2020
Modified Files:
src/usr.sbin/sysinst: defs.h main.c sysinst.8
Log Message:
Remove unused "rel" global variable and make the -r option a no-op.
To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/sysinst/main.c
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/sysinst.8
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.55 src/usr.sbin/sysinst/defs.h:1.56
--- src/usr.sbin/sysinst/defs.h:1.55 Mon Feb 10 14:55:53 2020
+++ src/usr.sbin/sysinst/defs.h Wed Feb 19 21:51:21 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.55 2020/02/10 14:55:53 martin Exp $ */
+/* $NetBSD: defs.h,v 1.56 2020/02/19 21:51:21 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -362,7 +362,6 @@ struct install_partition_desc {
int debug; /* set by -D option */
-char rel[SSTRSIZE];
char machine[SSTRSIZE];
int ignorerror;
Index: src/usr.sbin/sysinst/main.c
diff -u src/usr.sbin/sysinst/main.c:1.21 src/usr.sbin/sysinst/main.c:1.22
--- src/usr.sbin/sysinst/main.c:1.21 Wed Feb 19 18:08:03 2020
+++ src/usr.sbin/sysinst/main.c Wed Feb 19 21:51:21 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.21 2020/02/19 18:08:03 martin Exp $ */
+/* $NetBSD: main.c,v 1.22 2020/02/19 21:51:21 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -87,7 +87,7 @@ struct f_arg {
};
static const struct f_arg fflagopts[] = {
- {"release", REL, rel, sizeof rel},
+ {"release", REL, NULL, 0},
{"machine", MACH, machine, sizeof machine},
{"xfer dir", "/usr/INSTALL", xfer_dir, sizeof xfer_dir},
{"ext dir", "", ext_dir_bin, sizeof ext_dir_bin},
@@ -192,8 +192,7 @@ main(int argc, char **argv)
debug = 1;
break;
case 'r':
- /* Release name other than compiled in release. */
- strlcpy(rel, optarg, sizeof rel);
+ /* Release name - ignore for compatibility with older versions */
break;
case 'f':
/* Definition file to read. */
@@ -551,6 +550,8 @@ process_f_flag(char *f_name)
len = strlen(arg->name);
if (memcmp(cp, arg->name, len) != 0)
continue;
+ if (arg->var == NULL || arg->size == 0)
+ continue;
cp1 = cp + len;
cp1 += strspn(cp1, " \t");
if (*cp1++ != '=')
Index: src/usr.sbin/sysinst/sysinst.8
diff -u src/usr.sbin/sysinst/sysinst.8:1.1 src/usr.sbin/sysinst/sysinst.8:1.2
--- src/usr.sbin/sysinst/sysinst.8:1.1 Wed Feb 19 21:42:54 2020
+++ src/usr.sbin/sysinst/sysinst.8 Wed Feb 19 21:51:21 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: sysinst.8,v 1.1 2020/02/19 21:42:54 martin Exp $
+.\" $NetBSD: sysinst.8,v 1.2 2020/02/19 21:51:21 martin Exp $
.\"
.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -34,7 +34,6 @@
.Nm
.Op Fl D
.Op Fl f Ar definition_file
-.Op Fl r Ar release
.Sh DESCRIPTION
.Nm
is a menu-based program that may be used to install or upgrade a
@@ -60,11 +59,6 @@ as a file for definitions other than the
See the
.Sx DEFINITION FILE
section for its format.
-.It Fl r Ar release
-Use
-.Ar release
-as the release name if it is different to the one compiled.
-Currently unused.
.El
.Sh DEFINITION FILE
A definition file can be used with
@@ -84,7 +78,6 @@ respectively, as determined by the image
is used on):
.Bl -column "targetroot mount" "pub/NetBSD/NetBSD-REL"
.It Sy "option name" Ta Sy "default value" Ta Sy "description"
-.It release Ta REL Ta Release name (also set by Fl r Ar release )
.It machine Ta MACH Ta Machine architecture
.It xfer dir Ta /usr/INSTALL Ta Transfer dir
.It ext dir Ta "" Ta Extract dir (will usually be set later on)