Don't panic if we can't malloc a cblock...just print a console message
and be happy.
This commit is contained in:
parent
7daf0174d8
commit
7bb4d900b6
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user