Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File11.5.16.16 xfs_drv_close TOS Name: »xfs_drv_close« - Force a disk media change. Parameters: a0 = DMD * d0 = int mode -> d0 = long errcode Description: The function xfs_drv_close also performs two tasks, depending on mode: 1. mode == 0: The kernel requests the XFS to close the drive, if possible. If this is not permitted then EACCON must be returned, else all structures are to be released or caches written back and E_OK returned. Opened fies are recognized already by the kernel and closing of the drive will be prevented. However only those files that have a handle and are known to the kernel can be recognized here. For the sake of safety the kernel calls xfs_sync before calling this function in case a write-back cache is being used. This strategy will be carried out also even if at some time a mechanism is built in that monitors eject buttons of interchangeablemedia drives or CD-ROMs, and bars ejection if necessary. 2. mode == 1: The kernel forces closing of the drive, the XFS has to return E_OK. No caches may be written back as the drive is already invalid (after a media change has been reported already). DDs and FDs do not have to be released as far as they are still referenced by the kernel, i.e. the kernel still performs xfs_freeDD or dev_close even after a media change. The internal DOS_XFS passes the call on to the DFS function of the same name, and in addition the XFS structures will be released if necessary. Group: Make-up of an XFS See also: MagiC's XFS-concept