Commit 2720c90b authored by Ben Avison's avatar Ben Avison
Browse files

Reworked error code

Detail:
  Now uses Hdr:FileCoreErr rather than containing its own definitions of the
  low-level FileCore error numbers. Autogenerates and exports a new header,
  Hdr:ADFSErr, and a C version of the same, containing error definitions
  within the ADFS error block, derived from the error offsets from
  Hdr:FileCoreErr plus the ADFS-specific errors. s.AdfsErrors is now only
  used to list the errors for which an error block needs to be allocated for
  ADFS's own use.
Admin:
  No changes to the binary.

Version 3.42. Tagged as 'ADFS-3_42'
parent 069303ab
......@@ -28,6 +28,10 @@ COMPONENT = ADFS
#
CHEADER1 = ${COMPONENT}
HEADER1 = ${COMPONENT}
HEADER2 = ADFSErr
ASMCHEADER1 = ADFSErr
EXPORTS = hdr.ADFSErr ${C_EXP_HDR}.ADFSErr
TOKENSOURCE = s.TokenHelp
TOKHELPSRC = ${TOKENSOURCE}
......@@ -39,11 +43,20 @@ ASFLAGS = ${OPTIONS}
include StdTools
include AAsmModule
hdr.ADFSErr: o.ADFSErr
${LD} -bin -o $@ o.ADFSErr
SetType $@ Text
o.ADFSErr: s.ADFSErr
${MKDIR} o
${AS} -o $@ s.ADFSErr -I<Hdr$Dir>.Global,<Hdr$Dir>.Interface
#
# Generic rules:
#
clean::
${WIPE} o ${WFLAGS}
${RM} hdr.ADFSErr
@@echo ${COMPONENT}: cleaned
# Dynamic dependencies:
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.41"
Module_Version SETA 341
Module_MajorVersion SETS "3.42"
Module_Version SETA 342
Module_MinorVersion SETS ""
Module_Date SETS "14 Oct 2011"
Module_ApplicationDate SETS "14-Oct-11"
Module_Date SETS "19 Mar 2012"
Module_ApplicationDate SETS "19-Mar-12"
Module_ComponentName SETS "ADFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/ADFS/ADFS"
Module_FullVersion SETS "3.41"
Module_HelpVersion SETS "3.41 (14 Oct 2011)"
Module_FullVersion SETS "3.42"
Module_HelpVersion SETS "3.42 (19 Mar 2012)"
END
/* (3.41)
/* (3.42)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.41
#define Module_MajorVersion_CMHG 3.42
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Oct 2011
#define Module_Date_CMHG 19 Mar 2012
#define Module_MajorVersion "3.41"
#define Module_Version 341
#define Module_MajorVersion "3.42"
#define Module_Version 342
#define Module_MinorVersion ""
#define Module_Date "14 Oct 2011"
#define Module_Date "19 Mar 2012"
#define Module_ApplicationDate "14-Oct-11"
#define Module_ApplicationDate "19-Mar-12"
#define Module_ComponentName "ADFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/ADFS/ADFS"
#define Module_FullVersion "3.41"
#define Module_HelpVersion "3.41 (14 Oct 2011)"
#define Module_LibraryVersionInfo "3:41"
#define Module_FullVersion "3.42"
#define Module_HelpVersion "3.42 (19 Mar 2012)"
#define Module_LibraryVersionInfo "3:42"
GBLS FSName
FSName SETS "adfs"
GBLS fcerror
fcerror SETS "FSErr"
MACRO
$num FSErr $name, $str
= " AddError $FSName.$name, ""$str"", &"
= :STR: (&10000 + fsnumber_$FSName:SHL:8 + &$num), 10
MEND
GET ListOpts
GET FSNumbers
AREA Text, DATA
; File header
= "; This is an autogenerated file, do not edit", 10, 10
; Define all the errors that FileCore generates for the FS
GET FileCoreErr
; Define additional FS errors
11 FSErr FormatEsc, Escape whilst formatting (disc structure invalid)
70 FSErr FormatNotSupportedOnWinnie, Format not available for Winnies
71 FSErr DensityNotSupported, Density not supported
72 FSErr SectorSizeNotSupported, Sectors size not supported
73 FSErr TooManySectors, Too many sectors on a track
74 FSErr BadFormat, Bad format
75 FSErr TooManyDefects2, Too many defects
76 FSErr NoFloppy, Floppy drive not connected
A0 FSErr DriverInUse, Driver in use
; File footer
= 10, " END", 10
; Pad to word alignment with newline characters
ALIGN 4, 0, 10
END
......@@ -46,95 +46,38 @@ NewDiscErrorBit bit 0
AdfsModuleNum * &108
MACRO
$num err $name,$str
ASSERT &$num>0 ;word aligned 0 byte marks entry end
ASSERT &$num<&100
$name.Err * &$num
MEND
;ErrorTable
IntEscapeErr * &80
GET Hdr:FileCoreErr
GET Hdr:ADFSErr
MACRO
$num error $name,$str,$alttag
ASSERT &$num>0 ;word aligned 0 byte marks entry end
ASSERT &$num<&100
$name.Err * &$num
$name.ErrBlk
& &$num :OR: (AdfsModuleNum :SHL: 8)
[ "$alttag"=""
= "$name",0
|
= "$alttag",0
]
% (4-(.-org):MOD:4):MOD:4 ;align with zeroes
ADFSErrorBlock $name, $alttag
[ "$alttag" <> ""
$name.ErrBlk MakeInternatErrorBlock adfs$name,, $alttag
|
$name.ErrBlk MakeInternatErrorBlock adfs$name,, $name
]
MEND
;ErrorTable
IntEscapeErr * &80
11 error ExtEscape,Escape,Escape
[ fix_4
11 error FormatEsc,Escape whilst formatting (disc structure invalid),FormEsc
]
70 error FormatNotSupportedOnWinnie,Format not available for Winnies,WinForm
71 error DensityNotSupported,Density not supported,BadDens
72 error SectorSizeNotSupported,Sectors size not supported,BadSS
73 error TooManySectors,Too many sectors on a track,BadSPT
74 error BadFormat,Bad format,BadForm
75 error TooManyDefects,Too many defects,Defects
76 error NoFloppy,Floppy drive not connected,NoFloppy
;92 ABORTED
;93 WONT
;94 BAD PARMS
;;95 error TooManyDefects,Too many defects
;96 error CantDelCsd,Can't delete current directory
;97 error CantDelLib,Can't delete library
;98 error CompactReq,Compaction required
;99 error MapFull,Free space map full
9A err BadDisc,Bad disc ;not ADFS format
;9B error TooManyDiscs,Too many discs
;9D error BadUp,Illegal use of ^
;9E error AmbigDisc,Ambiguous disc name
;9F error NotRefDisc,Not same disc
;A0 error FilecoreInUse,Filecore in use
A0 error DriverInUse,Driver in use,InUse
A1 error BadParms,Bad parameters
;A2 error CantDelUrd,Can't delete user root directory
;A5 error Buffer,No room for buffer
;A6 error Workspace,ADFS Workspace corrupt
;A7 error MultipleClose,Multiple file closing errors
;A8 error BrokenDir,Broken directory
;A9 error BadFsMap,Bad free space map
;AA BAD CHECKSUM
;AB error BadDefectList,Bad defect list
AC error BadDrive,Bad drive,BadDrv
;AD error Size,Sizes don't match ;BACKUP
;AE error SameDisc,Same disc ;BACKUP
;B0 error BadRename,Bad RENAME
;B3 error DirFull,Directory full
;B4 error DirNotEmpty,Directory not empty
;B7 OUTSIDE FILE
;BD error Access,Access violation
;C0 error TooManyOpen,Too many open files
;C1 NOT OPEN FOR UPDATE
;C2 error Open,File open
;C3 error Locked,Locked
;C4 error Exists,Already exists
;C5 error Types,Types don't match
;C6 error DiscFull,Disc full
C7 error Disc,Disc error
C9 err WriteProt,Protected disc
;CA DATA LOST,CHANNEL
;CB BAD OPT
CC error BadName,Bad name
;CD DRIVE NOT READY
D3 err DriveEmpty,Drive empty
;D4 error DiscNotFound,Disc not found
;D5 error DiscNotPresent,Disc not present
;D6 error NotFound,Not found
;DE error Channel,Channel
;DF EOF
;FD error WildCards,Wild cards
FE error BadCom,Bad command
ADFSErrorBlock ExtEscape, Escape
[ fix_4
ADFSErrorBlock FormatEsc, FormEsc
]
ADFSErrorBlock FormatNotSupportedOnWinnie, WinForm
ADFSErrorBlock DensityNotSupported, BadDens
ADFSErrorBlock SectorSizeNotSupported, BadSS
ADFSErrorBlock TooManySectors, BadSPT
ADFSErrorBlock BadFormat, BadForm
ADFSErrorBlock TooManyDefects2, Defects
ADFSErrorBlock NoFloppy
ADFSErrorBlock DriverInUse, InUse
ADFSErrorBlock BadParms
ADFSErrorBlock BadDrive, BadDrv
ADFSErrorBlock Disc
ADFSErrorBlock BadName
ADFSErrorBlock BadCom
; System errors
......
......@@ -663,7 +663,7 @@ DoFormat ROUT
; Check we've not had too many defects
ADRL lr, DefectPool + ?DefectPool
CMP r11, lr
baddr r0, TooManyDefectsErrBlk, HS
baddr r0, TooManyDefects2ErrBlk, HS
SETV HS
BVS %FT90
......
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