Whoops! Fix a stupid bogon.
This commit is contained in:
parent
d41fe60984
commit
19d06873fb
|
@ -24,7 +24,7 @@
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
* library functions for userconfig library
|
* library functions for userconfig library
|
||||||
*
|
*
|
||||||
* $Id: uc_main.c,v 1.2 1996/10/03 07:50:09 jkh Exp $
|
* $Id: uc_main.c,v 1.3 1996/10/04 13:33:45 jkh Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -71,6 +71,7 @@ uc_open(char *name){
|
||||||
struct kernel *kern;
|
struct kernel *kern;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
char kname[80];
|
char kname[80];
|
||||||
|
int i;
|
||||||
|
|
||||||
if (strcmp(name, "-incore")==0){
|
if (strcmp(name, "-incore")==0){
|
||||||
incore=1;
|
incore=1;
|
||||||
|
@ -94,7 +95,7 @@ uc_open(char *name){
|
||||||
i = 0;
|
i = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
i = nlist(kname, nl);
|
i = nlist(kname, kern_nl);
|
||||||
#else
|
#else
|
||||||
i = nlist(kname, nl);
|
i = nlist(kname, nl);
|
||||||
#endif
|
#endif
|
||||||
|
@ -103,9 +104,15 @@ uc_open(char *name){
|
||||||
kern = (struct kernel *)-5;
|
kern = (struct kernel *)-5;
|
||||||
return kern;
|
return kern;
|
||||||
}
|
}
|
||||||
|
#ifdef KERN_NO_SYMBOLS
|
||||||
|
if (!incore) {
|
||||||
|
kern->nl=(struct nlist *)malloc(sizeof(kern_nl));
|
||||||
|
bcopy(kern_nl, kern->nl, sizeof(kern_nl));
|
||||||
|
}
|
||||||
|
#else
|
||||||
kern->nl=(struct nlist *)malloc(sizeof(nl));
|
kern->nl=(struct nlist *)malloc(sizeof(nl));
|
||||||
bcopy(nl, kern->nl, sizeof(nl));
|
bcopy(nl, kern->nl, sizeof(nl));
|
||||||
|
#endif
|
||||||
if(incore){
|
if(incore){
|
||||||
if((kd=open("/dev/kmem", O_RDONLY))<0){
|
if((kd=open("/dev/kmem", O_RDONLY))<0){
|
||||||
free(kern);
|
free(kern);
|
||||||
|
|
Loading…
Reference in New Issue