diff options
author | David Greenman <dg@FreeBSD.org> | 1994-05-29 07:50:11 +0000 |
---|---|---|
committer | David Greenman <dg@FreeBSD.org> | 1994-05-29 07:50:11 +0000 |
commit | 329cfeccd5229b8205dd981e64ee8a2170dd6bb4 (patch) | |
tree | 800b3de1bfd0525f0fbd1667c152c34c9ade9389 /sys/kern/subr_clist.c | |
parent | 3962127e78e4cdde3f5dfe749e9d7fe86cc92817 (diff) | |
download | src-329cfeccd5229b8205dd981e64ee8a2170dd6bb4.tar.gz src-329cfeccd5229b8205dd981e64ee8a2170dd6bb4.zip |
Don't panic if we can't malloc a cblock...just print a console message
and be happy.
Notes
Notes:
svn path=/head/; revision=1624
Diffstat (limited to 'sys/kern/subr_clist.c')
-rw-r--r-- | sys/kern/subr_clist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/subr_clist.c b/sys/kern/subr_clist.c index 7ce49c4d24ad..d0b14966d25f 100644 --- a/sys/kern/subr_clist.c +++ b/sys/kern/subr_clist.c @@ -92,8 +92,10 @@ cblock_alloc_cblocks(number) for (i = 0; i < number; ++i) { tmp = malloc(sizeof(struct cblock), M_TTYS, M_NOWAIT); - if (!tmp) - panic("clist_init: could not allocate cblock"); + if (!tmp) { + printf("cblock_alloc_cblocks: could not malloc cblock"); + break; + } bzero((char *)tmp, sizeof(struct cblock)); cblock_free(tmp); } |