Commit 63e4ebc0 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:SCSIFSErr, and a C version of the same, containing error definitions
  within the SCSIFS error block, derived from the error offsets from
  Hdr:FileCoreErr. hdr.MyErrors is now only used to list the errors for
  which an error block needs to be allocated for SCSIFS's own use.
Admin:
  Only functional change is that *Configure SCSIFSdrive now returns the
  correct error number if an invalid drive is specified (previously the
  error number was miscalculated).

Version 1.24. Tagged as 'SCSIFS-1_24'
parent 76f47491
......@@ -29,6 +29,10 @@ COMPONENT = SCSIFS
#
CHEADER1 = ${COMPONENT}
HEADER1 = ${COMPONENT}
HEADER2 = SCSIFSErr
ASMCHEADER1 = SCSIFSErr
EXPORTS = hdr.SCSIFSErr ${C_EXP_HDR}.SCSIFSErr
TOKHELPSRC = ${TOKENSOURCE}
HELPSRC = HelpText
......@@ -38,11 +42,20 @@ RESOURCES = No
include StdTools
include AAsmModule
hdr.SCSIFSErr: o.SCSIFSErr
${LD} -bin -o $@ o.SCSIFSErr
SetType $@ Text
o.SCSIFSErr: s.SCSIFSErr
${MKDIR} o
${AS} -o $@ s.SCSIFSErr -I<Hdr$Dir>.Global,<Hdr$Dir>.Interface
#
# Generic rules:
#
clean::
${WIPE} o ${WFLAGS}
${RM} hdr.SCSIFSErr
@@echo ${COMPONENT}: cleaned
# Dynamic dependencies:
......@@ -14,3 +14,4 @@
|
Dir <Obey$Dir>
amu_machine clean
stripdepnd
| Copyright 2012 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine export_hdrs
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.23"
Module_Version SETA 123
Module_MajorVersion SETS "1.24"
Module_Version SETA 124
Module_MinorVersion SETS ""
Module_Date SETS "27 Nov 2011"
Module_ApplicationDate SETS "27-Nov-11"
Module_Date SETS "19 Mar 2012"
Module_ApplicationDate SETS "19-Mar-12"
Module_ComponentName SETS "SCSIFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
Module_FullVersion SETS "1.23"
Module_HelpVersion SETS "1.23 (27 Nov 2011)"
Module_FullVersion SETS "1.24"
Module_HelpVersion SETS "1.24 (19 Mar 2012)"
END
/* (1.23)
/* (1.24)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.23
#define Module_MajorVersion_CMHG 1.24
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 27 Nov 2011
#define Module_Date_CMHG 19 Mar 2012
#define Module_MajorVersion "1.23"
#define Module_Version 123
#define Module_MajorVersion "1.24"
#define Module_Version 124
#define Module_MinorVersion ""
#define Module_Date "27 Nov 2011"
#define Module_Date "19 Mar 2012"
#define Module_ApplicationDate "27-Nov-11"
#define Module_ApplicationDate "19-Mar-12"
#define Module_ComponentName "SCSIFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
#define Module_FullVersion "1.23"
#define Module_HelpVersion "1.23 (27 Nov 2011)"
#define Module_LibraryVersionInfo "1:23"
#define Module_FullVersion "1.24"
#define Module_HelpVersion "1.24 (19 Mar 2012)"
#define Module_LibraryVersionInfo "1:24"
......@@ -21,79 +21,12 @@ DiscErrorBit bit 31
ScsiFsModuleNum * (&100 + fsnumber_SCSIFS)
MACRO
$num err $name,$str
ASSERT &$num>0 ;word aligned 0 byte marks entry end
ASSERT &$num<&100
$name.Err * &$num
MEND
MACRO
$num error $name,$str
ASSERT &$num>0 ;word aligned 0 byte marks entry end
ASSERT &$num<&100
$name.Err * &$num
$name.ErrBlk
& &$num :OR: (fsnumber_SCSIFS :SHL: 8)
= "$str",0
% (4-(.-org):MOD:4):MOD:4 ;align with zeroes
MEND
;ErrorTable
IntEscapeErr * &80
;11 error ExtEscape,Escape
;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 error 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
A1 err 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 err BadDefectList,Bad defect list
AC error BadDrive,Bad drive
;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
DiscErr * &C7
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
GET Hdr:FileCoreErr
GET Hdr:SCSIFSErr
BadDriveErrBlk MakeErrorBlock SCSIFSBadDrive
END
GBLS FSName
FSName SETS "SCSIFS"
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
; File footer
= 10, " END", 10
; Pad to word alignment with newline characters
ALIGN 4, 0, 10
END
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