From 7ae3b92f0df9d6c82a9ba5774989e6cb55c2d6c4 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Thu, 3 Oct 1996 08:17:16 +0000 Subject: [PATCH] Check return values from uc_open() correctly. Note: This seems to work really well when running the GENERIC kernel but not with the BOOTMFS kernel. Further work is needed. --- release/sysinstall/install.c | 6 +++--- usr.sbin/sade/install.c | 6 +++--- usr.sbin/sysinstall/install.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index 8b3e5a7e238..ad29178e99e 100644 --- a/release/sysinstall/install.c +++ b/release/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.123 1996/10/02 10:44:31 jkh Exp $ + * $Id: install.c,v 1.124 1996/10/03 06:01:35 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -915,13 +915,13 @@ save_userconfig_to_kernel(char *kern) int i, d; core = uc_open("-incore"); - if (!core) { + if (core < 0) { msgDebug("Can't read in-core information for kernel.\n"); return; } boot = uc_open(kern); - if (!boot) { + if (boot < 0) { msgDebug("Can't read device information for kernel image %s\n", kern); return; } diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 8b3e5a7e238..ad29178e99e 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.123 1996/10/02 10:44:31 jkh Exp $ + * $Id: install.c,v 1.124 1996/10/03 06:01:35 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -915,13 +915,13 @@ save_userconfig_to_kernel(char *kern) int i, d; core = uc_open("-incore"); - if (!core) { + if (core < 0) { msgDebug("Can't read in-core information for kernel.\n"); return; } boot = uc_open(kern); - if (!boot) { + if (boot < 0) { msgDebug("Can't read device information for kernel image %s\n", kern); return; } diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 8b3e5a7e238..ad29178e99e 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.123 1996/10/02 10:44:31 jkh Exp $ + * $Id: install.c,v 1.124 1996/10/03 06:01:35 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -915,13 +915,13 @@ save_userconfig_to_kernel(char *kern) int i, d; core = uc_open("-incore"); - if (!core) { + if (core < 0) { msgDebug("Can't read in-core information for kernel.\n"); return; } boot = uc_open(kern); - if (!boot) { + if (boot < 0) { msgDebug("Can't read device information for kernel image %s\n", kern); return; }