Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Remove unused "rel" global variable and mak...
details: https://anonhg.NetBSD.org/src/rev/d229417acc5a
branches: trunk
changeset: 744970:d229417acc5a
user: martin <martin%NetBSD.org@localhost>
date: Wed Feb 19 21:51:21 2020 +0000
description:
Remove unused "rel" global variable and make the -r option a no-op.
diffstat:
usr.sbin/sysinst/defs.h | 3 +--
usr.sbin/sysinst/main.c | 9 +++++----
usr.sbin/sysinst/sysinst.8 | 9 +--------
3 files changed, 7 insertions(+), 14 deletions(-)
diffs (91 lines):
diff -r 926b4da562ae -r d229417acc5a usr.sbin/sysinst/defs.h
--- a/usr.sbin/sysinst/defs.h Wed Feb 19 21:49:48 2020 +0000
+++ b/usr.sbin/sysinst/defs.h Wed Feb 19 21:51:21 2020 +0000
@@ -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 @@
int debug; /* set by -D option */
-char rel[SSTRSIZE];
char machine[SSTRSIZE];
int ignorerror;
diff -r 926b4da562ae -r d229417acc5a usr.sbin/sysinst/main.c
--- a/usr.sbin/sysinst/main.c Wed Feb 19 21:49:48 2020 +0000
+++ b/usr.sbin/sysinst/main.c Wed Feb 19 21:51:21 2020 +0000
@@ -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 @@
};
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 @@
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 @@
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++ != '=')
diff -r 926b4da562ae -r d229417acc5a usr.sbin/sysinst/sysinst.8
--- a/usr.sbin/sysinst/sysinst.8 Wed Feb 19 21:49:48 2020 +0000
+++ b/usr.sbin/sysinst/sysinst.8 Wed Feb 19 21:51:21 2020 +0000
@@ -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 @@
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 @@
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)
Home |
Main Index |
Thread Index |
Old Index