Skip to content

Commit

Permalink
fixes #148
Browse files Browse the repository at this point in the history
  • Loading branch information
boeckmann authored and PerditionC committed May 16, 2024
1 parent 1b6de0f commit 1ce349e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 1 addition & 4 deletions kernel/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,7 @@ void PreConfig(void)
#ifdef DEBUG
/* printf("Preliminary %d buffers allocated at 0x%p\n", Config.cfgBuffers, buffers);*/
#endif

LoL->DPBp =
DynAlloc("DPBp", blk_dev.dh_name[0], sizeof(struct dpb));


LoL->sfthead = MK_FP(FP_SEG(LoL), 0xcc); /* &(LoL->firstsftt) */
/* LoL->FCBp = (sfttbl FAR *)&FcbSft; */
/* LoL->FCBp = (sfttbl FAR *)
Expand Down
9 changes: 7 additions & 2 deletions kernel/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,13 @@ STATIC VOID update_dcb(struct dhdr FAR * dhp)
if (nunits == 0) return;

/* allocate memory for new device control blocks, insert into chain [at end], and update our pointer to new end */
dpb = (struct dpb FAR *)KernelAlloc(nunits * sizeof(struct dpb), 'E', Config.cfgDosDataUmb);

if ( LoL->first_mcb ) {
dpb = (struct dpb FAR *)KernelAlloc(nunits * sizeof(struct dpb), 'E', Config.cfgDosDataUmb);
}
else {
dpb = DynAlloc("DPBp", blk_dev.dh_name[0], sizeof(struct dpb));
}

/* find end of dpb chain or initialize root if needed */
if (LoL->nblkdev == 0)
{
Expand Down

0 comments on commit 1ce349e

Please sign in to comment.