Commit 12326543 authored by Ben Avison's avatar Ben Avison

Fix FSEntry_Func 33

Detail:
  It appears that this entry (Get usage of offset) was never updated to
  support the "BigDir" directory format (E+/F+, long filenames, >77 entries
  per directory) at RISC OS 4. This results in OS_FSControl 52 also failing
  for such discs.
Admin:
  Tested using SDFS, but should apply equally to any other FileCore filing
  system.

Version 3.54. Tagged as 'FileCore-3_54'
parent bd8a7284
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.53"
Module_Version SETA 353
Module_MajorVersion SETS "3.54"
Module_Version SETA 354
Module_MinorVersion SETS ""
Module_Date SETS "28 Oct 2012"
Module_ApplicationDate SETS "28-Oct-12"
Module_Date SETS "12 Nov 2012"
Module_ApplicationDate SETS "12-Nov-12"
Module_ComponentName SETS "FileCore"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/FileCore"
Module_FullVersion SETS "3.53"
Module_HelpVersion SETS "3.53 (28 Oct 2012)"
Module_FullVersion SETS "3.54"
Module_HelpVersion SETS "3.54 (12 Nov 2012)"
END
/* (3.53)
/* (3.54)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.53
#define Module_MajorVersion_CMHG 3.54
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 28 Oct 2012
#define Module_Date_CMHG 12 Nov 2012
#define Module_MajorVersion "3.53"
#define Module_Version 353
#define Module_MajorVersion "3.54"
#define Module_Version 354
#define Module_MinorVersion ""
#define Module_Date "28 Oct 2012"
#define Module_Date "12 Nov 2012"
#define Module_ApplicationDate "28-Oct-12"
#define Module_ApplicationDate "12-Nov-12"
#define Module_ComponentName "FileCore"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/FileCore"
#define Module_FullVersion "3.53"
#define Module_HelpVersion "3.53 (28 Oct 2012)"
#define Module_LibraryVersionInfo "3:53"
#define Module_FullVersion "3.54"
#define Module_HelpVersion "3.54 (12 Nov 2012)"
#define Module_LibraryVersionInfo "3:54"
......@@ -2349,8 +2349,15 @@ DoOsFunObjectAtOffset ROUT
BL FindDir ;(R3->R0,R5,R6,V)
BVS %FT85
[ BigDir
BL GetDirFirstEntry ; (R3,R5->R4)
BL TestBigDir ; (R3->LR,Z)
SUBNE R4, R4, #NewDirEntrySz ; small dir
SUBEQ R4, R4, #BigDirEntrySize; big dir
|
ASSERT OldDirEntrySz = NewDirEntrySz
SUB R4, R5, #NewDirEntrySz-DirFirstEntry
]
B %FT45
20
......@@ -2394,11 +2401,29 @@ DoOsFunObjectAtOffset ROUT
45
; Check for end of directory
[ BigDir
BL TestBigDir ; (R3->LR,Z)
BNE %FT01 ; not big dir
; big dir
ADD R4, R4, #BigDirEntrySize ; go to next entry
BL BigDirFinished ; (R4,R5->Z)
BNE %BT20 ; more to do
B %FT02 ; finished
01
; not big dir
LDRB LR, [R4, #NewDirEntrySz] !
AND lr, lr, r9
CMPS LR, #" "
BHI %BT20 ; branch if entry not empty
02
|
ASSERT OldDirEntrySz = NewDirEntrySz
LDRB LR, [R4, #NewDirEntrySz] !
AND lr, lr, r9
CMPS LR, #" "
BHI %BT20 ; branch if entry not empty
]
; Processing for end of scanning one directory
......@@ -2421,11 +2446,24 @@ DoOsFunObjectAtOffset ROUT
BNE %BT50
; Re-find where we're up to in this directory
[ BigDir
BL GetDirFirstEntry ; (R3,R5->R4)
BL TestBigDir ; (R3->LR,Z)
SUBNE R4, R4, #NewDirEntrySz
SUBEQ R4, R4, #BigDirEntrySize
|
ASSERT OldDirEntrySz = NewDirEntrySz
SUB R4, R5, #NewDirEntrySz-DirFirstEntry
]
55
[ BigDir
BL TestBigDir ; (R3->LR,Z)
ADDEQ R4, R4, #BigDirEntrySize
ADDNE R4, R4, #NewDirEntrySz
|
ASSERT OldDirEntrySz = NewDirEntrySz
ADD r4, r4, #NewDirEntrySz
]
BL ReadIndDiscAdd ;(R3,R4->LR)
TEQS LR, R7
BNE %BT55
......@@ -2479,6 +2517,8 @@ DoOsFunObjectAtOffset ROUT
; In r0 = pointer to buffer position
; r1 = end of buffer + 1
; r4 = pointer to direntry to copy into buffer
; BigDir R3 = disc address
; R5 = directory start
;
; places .<EntryName> into buffer
96
......@@ -2491,6 +2531,22 @@ DoOsFunObjectAtOffset ROUT
MOV r2, #"."
BL %BT95
Pull "r2,r4,r11,pc",VS ; 000524 KJB - was lr instead of pc
[ BigDir
BL TestBigDir ;(R3->LR,Z)
BNE %F98 ; when not a big dir use simpler code
LDR R11, [R4, #BigDirObNameLen]
BL GetBigDirName ; (R4,R5->LR) get the name ptr
MOV r4, lr
97
LDRB r2, [r4], #1
AND r2, r2, r9
BL %BT95
SUBS r11, r11, #1
BHI %BT97
Pull "r2,r4,r11,pc"
98
]
MOV r11, #NameLen
ADD r4, r4, #DirObName
97
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment