mirror of https://github.com/FDOS/kernel.git
From Lucho: fixes the CHKDSK I: "Invalid drive specification" bug
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@773 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
d3447eef6c
commit
4950f7483b
|
@ -225,6 +225,15 @@ void new_psp(seg para, int psize)
|
|||
p->ps_cmd.ctBuffer[0] = 0xd; /* command tail */
|
||||
}
|
||||
|
||||
STATIC UBYTE chkdrv(unsigned drive) /* from FCB: 0 = default, 1 = A:, ... */
|
||||
{
|
||||
if (drive)
|
||||
drive--; /* 0 = A:, 1 = B:, ... */
|
||||
else
|
||||
drive = default_drive;
|
||||
return get_cds(drive) ? 0 : 0xff; /* return 0 if drive is valid, else 0xff */
|
||||
}
|
||||
|
||||
STATIC UWORD patchPSP(UWORD pspseg, UWORD envseg, exec_blk FAR * exb,
|
||||
BYTE FAR * fnam)
|
||||
{
|
||||
|
@ -278,8 +287,8 @@ set_name:
|
|||
pspmcb->m_name[i] = '\0';
|
||||
|
||||
/* return value: AX value to be passed based on FCB values */
|
||||
return (get_cds(psp->ps_fcb1.fcb_drive) ? 0 : 0xff) |
|
||||
(get_cds(psp->ps_fcb2.fcb_drive) ? 0 : 0xff00);
|
||||
return chkdrv(psp->ps_fcb1.fcb_drive) |
|
||||
(chkdrv(psp->ps_fcb2.fcb_drive) << 8);
|
||||
}
|
||||
|
||||
int load_transfer(UWORD ds, exec_blk *exp, UWORD fcbcode, COUNT mode)
|
||||
|
|
Loading…
Reference in New Issue