summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/media.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-21 19:28:05 +0000
committerjkh <jkh@FreeBSD.org>1995-05-21 19:28:05 +0000
commit2b8e37d1d223299d50fe047fe5bff0f9aafba9f9 (patch)
tree29b9149606ed40d87c8390a301ae59edeec4bfa7 /usr.sbin/sysinstall/media.c
parent1942e9a0543985c47f93802a77d0f4e9782534f6 (diff)
downloadFreeBSD-src-2b8e37d1d223299d50fe047fe5bff0f9aafba9f9.zip
FreeBSD-src-2b8e37d1d223299d50fe047fe5bff0f9aafba9f9.tar.gz
Check status of the device init routine properly.
Diffstat (limited to 'usr.sbin/sysinstall/media.c')
-rw-r--r--usr.sbin/sysinstall/media.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c
index ce9d935..a68e378 100644
--- a/usr.sbin/sysinstall/media.c
+++ b/usr.sbin/sysinstall/media.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: media.c,v 1.11 1995/05/20 11:13:58 jkh Exp $
+ * $Id: media.c,v 1.12 1995/05/21 15:40:50 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -294,7 +294,8 @@ mediaOpen(char *parent, char *me)
else
snprintf(distname, FILENAME_MAX, "%s/%s", me, me);
if (mediaDevice->init)
- (*mediaDevice->init)(mediaDevice);
+ if ((*mediaDevice->init)(mediaDevice) == FALSE)
+ return -1;
fd = (*mediaDevice->get)(distname);
return fd;
}
OpenPOWER on IntegriCloud