2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 #include "dos_intern.h"
10 #include <dos/filesystem.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
16 #include <proto/dos.h>
18 AROS_LH3(BOOL
, UnLockRecord
,
21 AROS_LHA(BPTR
, fh
, D1
),
22 AROS_LHA(ULONG
, offset
, D2
),
23 AROS_LHA(ULONG
, length
, D3
),
26 struct DosLibrary
*, DOSBase
, 47, Dos
)
30 Release a lock made with LockRecord().
34 fh -- filehandle the lock was made on
35 offset -- starting position of the lock
36 length -- length of the record in bytes
42 The length and offset must match the corresponding LockRecord()
51 LockRecord(), UnLockRecords()
55 *****************************************************************************/
58 AROS_LIBBASE_EXT_DECL(struct DosLibrary
*,DOSBase
)
60 struct IOFileSys iofs
;
61 struct FileHandle
*fileH
= fh
;
68 InitIOFS(&iofs
, FSA_UNLOCK_RECORD
, DOSBase
);
70 iofs
.IOFS
.io_Device
= fileH
->fh_Device
;
71 iofs
.IOFS
.io_Unit
= fileH
->fh_Unit
;
73 iofs
.io_Union
.io_RECORD
.io_Offset
= offset
;
74 iofs
.io_Union
.io_RECORD
.io_Size
= length
;
78 SetIoErr(iofs
.io_DosError
);
80 if (iofs
.io_DosError
!= 0)