•  Back 
  •  MagiC's XFS-concept 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
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.40  Symbolic links and the XFS-concept                     TOS

Symbolic links (also called aliases in the user documentation in 
accordance with Macintosh nomenclature) are files that are specially 
labelled in some way, and instead of data contain a path which in turn 
points to another file. Such a path can also point to a no longer or 
not yet existing file. Paths can be absolute or relative, where the 
latter have the directory in which the link lies as a reference.

In memory such links are managed as structures:

{
   WORD n;         /* Rounded up to an even number, incl. EOS */
   char path[n];   /* Path with EOS at end  */
}

Note: When some XFS functions come across a symlink they have to 
dereference it, i.e. they return to the kernel in d0 the error-code 
ELINK and in a0 a pointer to a structure of the above form. The kernel 
then looks after the dereferencing and the limiting of the maximum 
nesting depth (if the symlink points to another one).

XFS functions that may return ELINK are:

xfs_path2DD, xfs_sfirst, xfs_snext, xfs_fopen, xfs_xattr, xfs_attrib.

See also: MagiC's XFS-concept