Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/distrib/utils/sysinst Pull up to netbsd-1-5 branch, OK'...
details: https://anonhg.NetBSD.org/src/rev/43b87f1ae33d
branches: netbsd-1-5
changeset: 489493:43b87f1ae33d
user: hubertf <hubertf%NetBSD.org@localhost>
date: Wed Sep 20 20:13:14 2000 +0000
description:
Pull up to netbsd-1-5 branch, OK'd by thorpej.
Revs:
> cvs rdiff -r1.56 -r1.57 basesrc/distrib/utils/sysinst/defs.h
> cvs rdiff -r1.23 -r1.24 basesrc/distrib/utils/sysinst/target.c
Log:
> * make target-routines (target_expand(), and whatnot) work if no root
> disk was selected. With this, sysinst can now be used on a "normal"
> system to adjust the system's timezone. Use the entry in the "Utilities"
> menu for that.
(The test install that I did was actually with a 1.5 system's sources ;-)
diffstat:
distrib/utils/sysinst/defs.h | 4 ++--
distrib/utils/sysinst/target.c | 21 +++++++++++++++------
2 files changed, 17 insertions(+), 8 deletions(-)
diffs (67 lines):
diff -r 2e008eab0c88 -r 43b87f1ae33d distrib/utils/sysinst/defs.h
--- a/distrib/utils/sysinst/defs.h Wed Sep 20 20:11:25 2000 +0000
+++ b/distrib/utils/sysinst/defs.h Wed Sep 20 20:13:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.53.2.2 2000/09/08 23:57:19 hubertf Exp $ */
+/* $NetBSD: defs.h,v 1.53.2.3 2000/09/20 20:13:14 hubertf Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -140,7 +140,7 @@
EXTERN int sectorsize;
/* Actual name of the disk. */
-EXTERN char diskdev[SSTRSIZE];
+EXTERN char diskdev[SSTRSIZE] INIT("");
EXTERN char disknames[STRSIZE];
EXTERN int numdisks;
EXTERN char *disktype; /* ST506, SCSI, ... */
diff -r 2e008eab0c88 -r 43b87f1ae33d distrib/utils/sysinst/target.c
--- a/distrib/utils/sysinst/target.c Wed Sep 20 20:11:25 2000 +0000
+++ b/distrib/utils/sysinst/target.c Wed Sep 20 20:13:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: target.c,v 1.22.10.1 2000/09/08 23:57:19 hubertf Exp $ */
+/* $NetBSD: target.c,v 1.22.10.2 2000/09/20 20:13:15 hubertf Exp $ */
/*
* Copyright 1997 Jonathan Stone
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: target.c,v 1.22.10.1 2000/09/08 23:57:19 hubertf Exp $");
+__RCSID("$NetBSD: target.c,v 1.22.10.2 2000/09/20 20:13:15 hubertf Exp $");
#endif
/*
@@ -148,7 +148,10 @@
{
int same;
- same = (strcmp(diskdev, get_rootdev()) == 0);
+ if (strcmp(diskdev, "") == 0) /* nothing selected yet */
+ same = 1; /* bad assumption: this is a live system */
+ else
+ same = (strcmp(diskdev, get_rootdev()) == 0);
return (same);
}
@@ -221,9 +224,15 @@
* so we can find out via statfs(). Abort if not.
*/
- /* append 'a' to the partitionless target disk device name. */
- snprintf(diskdevroot, STRSIZE, "%s%c", diskdev, 'a');
- result = is_active_rootpart(diskdevroot);
+ if (strcmp(diskdev, "") == 0) {
+ /* no root partition was ever selected. Assume that
+ * the currently mounted one should be used */
+ result = 1;
+ } else {
+ /* append 'a' to the partitionless target disk device name. */
+ snprintf(diskdevroot, STRSIZE, "%s%c", diskdev, 'a');
+ result = is_active_rootpart(diskdevroot);
+ }
return (result);
}
Home |
Main Index |
Thread Index |
Old Index