Commit d020e6b0 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Reinstate file existence for StoreInHAL={TRUE} case

Detail:
  s/sdcmos - The previous change to remove the filetype check when StoreInHAL={TRUE} also had the side-effect of removing the check for whether the file exists.
  This resulted in the module not terminating itself if the file was absent, and consequently all attempts to write to CMOS would generate a 'file not found' error, causing assorted bits of code to malfunction.
Admin:
  Tested on Raspberry Pi


Version 0.04. Tagged as 'SDCMOS-0_04'
parent 228c9741
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.03"
Module_Version SETA 3
Module_MajorVersion SETS "0.04"
Module_Version SETA 4
Module_MinorVersion SETS ""
Module_Date SETS "28 Aug 2012"
Module_ApplicationDate SETS "28-Aug-12"
Module_Date SETS "01 Sep 2012"
Module_ApplicationDate SETS "01-Sep-12"
Module_ComponentName SETS "SDCMOS"
Module_ComponentPath SETS "cddl/RiscOS/Sources/HWSupport/SD/SDCMOS"
Module_FullVersion SETS "0.03"
Module_HelpVersion SETS "0.03 (28 Aug 2012)"
Module_FullVersion SETS "0.04"
Module_HelpVersion SETS "0.04 (01 Sep 2012)"
END
/* (0.03)
/* (0.04)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.03
#define Module_MajorVersion_CMHG 0.04
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 28 Aug 2012
#define Module_Date_CMHG 01 Sep 2012
#define Module_MajorVersion "0.03"
#define Module_Version 3
#define Module_MajorVersion "0.04"
#define Module_Version 4
#define Module_MinorVersion ""
#define Module_Date "28 Aug 2012"
#define Module_Date "01 Sep 2012"
#define Module_ApplicationDate "28-Aug-12"
#define Module_ApplicationDate "01-Sep-12"
#define Module_ComponentName "SDCMOS"
#define Module_ComponentPath "cddl/RiscOS/Sources/HWSupport/SD/SDCMOS"
#define Module_FullVersion "0.03"
#define Module_HelpVersion "0.03 (28 Aug 2012)"
#define Module_LibraryVersionInfo "0:3"
#define Module_FullVersion "0.04"
#define Module_HelpVersion "0.04 (01 Sep 2012)"
#define Module_LibraryVersionInfo "0:4"
......@@ -19,6 +19,7 @@
; CDDL HEADER END
;
; Copyright 2012 Ben Avison. All rights reserved.
; Portions Copyright 2012 Jeffrey Lee.
; Use is subject to license terms.
;
......@@ -145,14 +146,18 @@ CallBackFromInit ROUT
LDRB r6, [r3]
STMIA r2!, {r4-r5}
STRB r6, [r2], #1
]
; Check it's the sort of file we're expecting
; Check it's a file (or image file)
MOV r0, #OSFile_ReadWithTypeNoPath
MOV r1, r2
SWI XOS_File
BVS %F90
TST r0, #object_file
BEQ %F90
[ :LNOT: StoreInHAL
; Check it's a sensible filetype
LDR r0, =FileType_Configuration
TEQ r6, r0
LDRNE r0, =FileType_MSDOS
......
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