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.31 xfs_sfirst TOS Name: »xfs_sfirst« - Search for first matching file. Parameters: a0 = DD * srchdir a1 = char *name (ohne Pfad) d0 = DTA * d1 = int attrib -> d0 = long errcode -> a0 = SYMLINK * (or Symlink if appropriate) Description: xfs_sfirst is required for Fsfirst. MiNT uses instead of this function a combination of Dreaddir and Fxattr, which however makes very many calls of the XFS driver necessary. The reserved area of the DTA can be used freely by the XFS; if this is too small, one has to proceed with similar heuristic methods to MiNT, i.e. pointers must be entered in the DTA that point to fixed descriptors. These descriptors however can be released again only with heuristic methods, because one never knows whether another Fsnext is coming or not. The kernel already gets the complete path with xfs_path2DD, so that only the pure pathname is passed in a1. As with all DOS calls that process a path, the XFS must ensure that the DD is protected for the duration of the processing. This is particularly critical if the filesystem is reentrant. If a file searched for is a symbolic link, then one has to pass ELINK as error-code in d0 and the pointer to the link in a0. The kernel then simply calls Fxattr} to fill the DTA. If a disk media change has occurred, then E_CHNG is to be returned; the kernel then automatically repeats the function. This also applies for all other functions. In every case xfs_dta_drive has to be initialized correctly, e.g. with: dta.dta_drive = srchdir->dd_dmd->d_drive. If E_OK or ELINK is returned without xfs_dta_drive being initialized, then the result is indeterminate. Group: Make-up of an XFS See also: MagiC's XFS-concept