Commit 4b9cb9e9 authored by Dan Ellis's avatar Dan Ellis
Browse files

Closing a file now allows the underlying filing system to object, preventing...

Closing a file now allows the underlying filing system to object, preventing the file from being closed.

Detail:
  The error return from the underlying filing system wasn't being used to
prevent the fileswitch record for the open file being removed.  This resulted
in the underlying filing system not being able to prevent closure of a file
handle.  This behaviour is relied upon by PipeFS when it returns an error
from the Sleep No More UpCall.

Admin:
  Tested on RPC.  Note that the 32 bit build doesn't work on the 26 bit
desktop for no identified reason.
Version 2.60. Tagged as 'FileSwitch-2_60'
parent 1b8bc439
......@@ -11,14 +11,14 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "2.59"
Module_Version SETA 259
Module_MajorVersion SETS "2.60"
Module_Version SETA 260
Module_MinorVersion SETS ""
Module_Date SETS "10 May 2001"
Module_ApplicationDate2 SETS "10-May-01"
Module_ApplicationDate4 SETS "10-May-2001"
Module_Date SETS "14 May 2001"
Module_ApplicationDate2 SETS "14-May-01"
Module_ApplicationDate4 SETS "14-May-2001"
Module_ComponentName SETS "FileSwitch"
Module_ComponentPath SETS "RiscOS/Sources/FileSys/FileSwitch"
Module_FullVersion SETS "2.59"
Module_HelpVersion SETS "2.59 (10 May 2001)"
Module_FullVersion SETS "2.60"
Module_HelpVersion SETS "2.60 (14 May 2001)"
END
/* (2.59)
/* (2.60)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 2.59
#define Module_MajorVersion_CMHG 2.60
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 10 May 2001
#define Module_Date_CMHG 14 May 2001
#define Module_MajorVersion "2.59"
#define Module_Version 259
#define Module_MajorVersion "2.60"
#define Module_Version 260
#define Module_MinorVersion ""
#define Module_Date "10 May 2001"
#define Module_Date "14 May 2001"
#define Module_ApplicationDate2 "10-May-01"
#define Module_ApplicationDate4 "10-May-2001"
#define Module_ApplicationDate2 "14-May-01"
#define Module_ApplicationDate4 "14-May-2001"
#define Module_ComponentName "FileSwitch"
#define Module_ComponentPath "RiscOS/Sources/FileSys/FileSwitch"
#define Module_FullVersion "2.59"
#define Module_HelpVersion "2.59 (10 May 2001)"
#define Module_FullVersion "2.60"
#define Module_HelpVersion "2.60 (14 May 2001)"
......@@ -192,6 +192,7 @@ DeallocateStream Entry "r0-r4, bcb"
DREG r14,", ext handle "
]
LDRB r4, scb_exthandle
ADR r0, streamtable ; Remember external handle for below
ADR r14, UnallocatedStream ; Free entry in stream table
STR r14, [r0, r4, LSL #2]
......@@ -1202,9 +1203,16 @@ FlushAndCloseStream Entry "r0-r2,$streaminfo" ; r3 and r6 in streaminfo
MOVCS r2, r2, LSR #8 ; Need type in bottom 12 bits
BL SReadTime ; Read machine date into r2,r3
BL CallFSClose ; Close it on the Filing System
EXIT VS ; On error return.
B %FT60
50 BL CallFSClose ; Close it on the Filing System
; On error, don't return because
; error wasn't necessarily from
; this call.
BL DeallocateStream ; Get rid of handle and scb
60 BL DeallocateStream ; Get rid of handle and scb
TEQ fp, #0 ; Forget errors if brain damaged
EXIT EQ ; call state
......
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