From b7bcef73a12e4a47234e555623ca17bdd3464992 Mon Sep 17 00:00:00 2001 From: Kenneth J Davis Date: Sun, 8 Aug 2021 14:26:34 -0400 Subject: [PATCH] build fixes - update inthndlr.c to compile with LFNAPI enabled (more fixes from earlier oops, lfnapi.c still doesn't compile) --- kernel/inthndlr.c | 10 +++++----- kernel/intr.asm | 2 +- kernel/lfnapi.c | 2 +- kernel/proto.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/inthndlr.c b/kernel/inthndlr.c index 73dada8..49beeee 100644 --- a/kernel/inthndlr.c +++ b/kernel/inthndlr.c @@ -1565,7 +1565,7 @@ dispatch: case 0x56: /* Win95 LFN - canonicalize file name/path */ case 0x60: { - switch (lr->CL) + switch (lr.CL) { /* truename - canonicalize path, accepts short/long/or combination as input and may return combined short/long name */ case 0x00: { @@ -1609,12 +1609,12 @@ lfn_findclose: sft FAR *s; unsigned char idx; - if (r->BX >= psp->ps_maxfiles) + if (lr.BX >= psp->ps_maxfiles) { rc = DE_INVLDHNDL; goto error_exit; } - idx = psp->ps_filetab[r->BX]; + idx = psp->ps_filetab[lr.BX]; s = idx_to_sft(idx); if (s == (sft FAR *)-1) { @@ -1647,7 +1647,7 @@ lfn_findclose: /* Win95 LFN - Win95 64 UTC file time to/from DOS date and time (local timezone) */ case 0xa7: { /* Note: valid input range limited to Jan 1, 1980 to Dec 31, 2107 */ - switch (lr->BL) + switch (lr.BL) { /* from Win95 UTC to DOS date/time */ case 0x00: { @@ -1699,7 +1699,7 @@ lfn_findclose: break; /* Setup LFN inode */ case 0x03: - rc = lfn_setup_inode(lr.BX, ((ULONG)lr.CX << 16) | lr.DX, ((ULONG)lr.SI << 16) | lr.DI); + rc = lfn_setup_inode(lr.BX, MK_ULONG(lr.CX, lr.DX), MK_ULONG(lr.SI,lr.DI)); break; /* Create LFN entries */ case 0x04: diff --git a/kernel/intr.asm b/kernel/intr.asm index e0d9d41..f0f098b 100644 --- a/kernel/intr.asm +++ b/kernel/intr.asm @@ -47,7 +47,7 @@ arg nr, {rp,%1} mov ax, [.nr] ; interrupt number mov [cs:%%intr_1-1], al jmp short %%intr_2 ; flush the instruction cache -%%intr_2 +%%intr_2: %if %1 == 4 lds bx, [.rp] ; regpack structure FAR %else diff --git a/kernel/lfnapi.c b/kernel/lfnapi.c index b725d19..928f16b 100644 --- a/kernel/lfnapi.c +++ b/kernel/lfnapi.c @@ -105,7 +105,7 @@ COUNT lfn_free_inode(COUNT handle) * Return value. * SUCCESS, LHE_INVLDHNDL */ -COUNT lfn_setup_inode(COUNT handle, ULONG dirstart, UWORD diroff) +COUNT lfn_setup_inode(COUNT handle, ULONG dirstart, ULONG diroff) { f_node_ptr fnp = xlt_fd(handle); if (fnp == 0 || fnp->f_count <= 0) return LHE_INVLDHNDL; diff --git a/kernel/proto.h b/kernel/proto.h index b76b8e6..f8fa240 100644 --- a/kernel/proto.h +++ b/kernel/proto.h @@ -250,7 +250,7 @@ VOID mcb_print(mcb FAR * mcbp); COUNT lfn_allocate_inode(VOID); COUNT lfn_free_inode(COUNT handle); -COUNT lfn_setup_inode(COUNT handle, ULONG dirstart, UWORD diroff); +COUNT lfn_setup_inode(COUNT handle, ULONG dirstart, ULONG diroff); COUNT lfn_create_entries(COUNT handle, lfn_inode_ptr lip); COUNT lfn_remove_entries(COUNT handle);