From 0145d80c3c4470d5d3dc75ef9bab2104e10e1499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Thu, 28 Dec 1995 14:40:59 +0000 Subject: [PATCH] Remove reference to _PATH_UNIX and make -N option functional. --- usr.sbin/ncrcontrol/ncrcontrol.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/usr.sbin/ncrcontrol/ncrcontrol.c b/usr.sbin/ncrcontrol/ncrcontrol.c index 9b486a8db48..f7c687da220 100644 --- a/usr.sbin/ncrcontrol/ncrcontrol.c +++ b/usr.sbin/ncrcontrol/ncrcontrol.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncrcontrol.c,v 1.8 1995/05/30 03:49:12 rgrimes Exp $ +** $Id: ncrcontrol.c,v 1.9 1995/09/14 18:14:28 se Exp $ ** ** Utility for NCR 53C810 device driver. ** @@ -182,11 +182,14 @@ void open_kvm(int flags) if (kvm_isopen) return; #if (__FreeBSD__ >= 2) - vmunix = getbootfile(); -#endif - if (vmunix == NULL) { + if (!vmunix) { + vmunix = getbootfile(); + } +#else + if (!vmunix) { vmunix = _PATH_UNIX; } +#endif #if defined(__NetBSD__) || (__FreeBSD__ >= 2) kvm = kvm_openfiles(vmunix, kmemf, NULL, flags, errbuf); if (kvm == NULL) { @@ -1621,7 +1624,13 @@ void main(argc, argv) "-k? list tortures\n" "-M (default: %s)\n" "-N (default: %s)\n" - , prog, _PATH_KMEM, _PATH_UNIX); + , prog, _PATH_KMEM, +#if (__FreeBSD__ >= 2) + getbootfile() +#else + _PATH_UNIX +#endif + ); if (verbose) fprintf (stderr, ident); exit (1); }