move the kernel file to /var/db
[unix-history] / usr / src / lib / libkvm / kvm.c
index 0492960..3df3668 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm.c      5.23 (Berkeley) %G%";
+static char sccsid[] = "@(#)kvm.c      5.25 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
@@ -288,6 +288,8 @@ kvm_dbopen(kd, uf)
 
        sprintf(dbname, "%skvm_%s", _PATH_VARRUN, uf);
        kd->db = dbm_open(dbname, O_RDONLY, 0);
 
        sprintf(dbname, "%skvm_%s", _PATH_VARRUN, uf);
        kd->db = dbm_open(dbname, O_RDONLY, 0);
+       if (kd->db == 0)
+               return (-1);
        /*
         * read version out of database
         */
        /*
         * read version out of database
         */