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-File5.16.3 Dcntl TOS Name: »Dcntl« - Execute a file-system-specific operation on a file or a directory. Opcode: 304 Syntax: int32_t Dcntl ( int16_t cmd, int8_t *name, int32_t arg ); Description: The function Dcntl executes the command cmd on the file or the directory name. Details depend on the file- system to which name refers. The meaning of the parameter arg is in turn dependent on cmd. Normally the Dcntl call is supported by the file- systems U:\\ and U:\DEV. The unified file-system U:\ knows the following commands: Command Description FS_INSTALL (0xf001) Installs a new file-system name: Must be U:\ arg: Pointer to fs_descr structure FS_MOUNT (0xf002) Mounts an already existing file-system in the unified system U:\ name: Name under which one can access the file- system arg: Pointer to fs_descr structure FS_UNMOUNT (0xf003) Unmounts a file-system installed by FS_MOUNT name: Name under which the file-system was mounted arg: Pointer to fs_descr structure FS_UNINSTALL (0xf004) Removes a file-system completely from the kernel. This command is only allowed if no further references to the file-system exist, so that any mounts have been revoked, for instance. name: U:\\ arg: Pointer to fs_descr structure FUTIME (0x4603) Is the complement to the Fcntl function of the same name. It is supported by MiNT as well as DOS-XFS in MagiC. A pointer to a mutimbuf structure is passed as a parameter. KER_GETINFO (0x0100) Obtains a pointer to the kernel functions of MagiC. The parameters name and arg must have NULL-values. The return is a pointer to a MX_KERNEL structure. (*) As of MagiC 6: MX_KER_GETINFO (0x6d00) (1) KER_DOSLIMITS (0x0101) Invites the kernel of MagiC to obtain the limits for FAT file-systems. The parameter name and arg must be set to NULL. The return is a pointer to a pointer to a MX_DOSLIMITS structure; this can therefore be diverted to one's own structure if a new driver is installed. This opcode is normally used only by hard disk drivers (such as HDDRIVER). (*) As of MagiC 6: MX_KER_DOSLIMITS (0x6d01) (1) KER_INTMAVAIL (0x102) KER_INTGARBC (0x103) These functions exist in versions of MagiC prior to Version 4.01, and are converted to Sconfig calls to avoid conflicts with drivers that have problems with unknown opcodes (*). KER_DRVSTAT (0x0104) Obtains simple information about a drive. The following apply: name: Is ignored arg: Pointer to two int16_ts. The first int16_t here must hold a NULL, into the second a drive number from 0..25 (A..Z) will be written. The possible return values for this opcode are: EDRIVE : Invalid drive number ELOCKED : Drived locked at present A value of 0 or >0 indicates that the drive is at present mounted or not mounted respectively. This opcode is only available from the MagiC Version of 09.09.95 onwards (*). As of MagiC 6: MX_KER_DRVSTAT (0x6d04) (1) KER_XFSNAME (0x0105) Obtains the name of the driver that is responsible for a given directory. name: Pathname (not filename!) arg: Pointer to a buffer at least 9 characters long which has to lie at an even address. A return value < 0 denotes no error; otherwise the name of the driver will be stored in the specified buffer; at present the following driver names are known: (a) "DOS_XFS": Old DOS-XFS (b) "VDOS_XFS": DOS-XFS with VFAT (c) "MMAC_HFS": MagiCMac-HFS This opcode is only available from the MagiC Version of 15.06.1996 onwards (*). As of MagiC 6: MX_KER_XFSNAME (0x6d05) (1) KER_INSTXFS (0x0200) Invites the kernel of MagiC to install an XFS (*) name: NULL-pointer arg: Driver to install As of MagiC 6: MX_KER_INSTXFS (0x6d02) (1) KER_SETWBACK (0x0300) Invites the kernel of MagiC to configure the WriteBack. As of MagiC Version 4.01, this opcode was converted to a Sconfig call, to prevent conflicts with drivers that have problems with unknown opcodes (*). DFS_GETINFO (0x1100) Obtains a pointer to the DOS_XFS functions of MagiC. The parameters name and arg must have NULL-values. The return is a pointer to a ??? structure. (*) As of MagiC 6: MX_DFS_GETINFO (0x6d40) (1) DFS_INSTDFS (0x1200) Installs a DFS under MagiC (*). name: NULL-pointer arg: Driver to install CDROMEJECT (0x4309) Takes charge of ejection of media. name: Path of the medium to be ejected arg: NULL The ejection function is supported for all drives that are accessed via an XHDI- compatible driver, as well as for Macintosh volumes (under MagiCMac). As of MagiC 6: MX_DFS_INSTDFS (0x6d41) (1) VFAT_CNFDFLN (0x5600) Configures a VFAT file-system name: U:\\ arg: Bit-vector that determines which drives permit long filenames The setting only becomes active on mounting a file-system, so that already mounted file- systems can not be affected by it. This opcode is only available from the MagiC Version of 02.01.96 onwards. (*). VFAT_CNFLN (0x5601) Serves for the configuration of a VFAT file-system. More exactly: Determines whether a mounted drive supports long filenames, or not. With this opcode therefore one can supplant the default value set by VFAT_CNFDFLN. So that the change becomes visible to the user, a SH_WDRAW message should be sent to the system shell. This opcode is only available as of the MagiC Version of 02.01.96 (*). PROC_CREATE (0xcc00) This function is reserved in MagiC for future use (*). It is no longer used as of MagiC 6. The file-system U:\DEV knows the following commands: Command Description DEV_INSTALL (0xde02) Installs a new driver for a device. name: Complete pathname of the driver arg: Pointer to dev_descr structure The device installed in this way may only be accessed via GEMDOS operations. DEV_M_INSTALL (0xcd00) Corresponds to DEV_INSTALL and has to be used in MagiC due to the incompatible driver format to MultiTOS. (*) name: Complete pathname of the driver arg: Pointer to MX_DDEV structure As of MagiC 6: MX_DEV_INSTALL (0x6d20) (1) DEV_NEWTTY (0xde00) Installs drivers for a new BIOS terminal name: Name of the terminal (in the form 'U:\DEV\DEVNAME') arg: BIOS device number of the terminal The BIOS must have been informed about the device via Bconmap, else any attempt to access the device will be punished with EUNDEV. DEV_NEWBIOS (0xde01) Installs a driver for a new BIOS non-terminal device (devices that must have their data transmitted raw, such as SCSI devices). name: Complete name of the device arg: Associated BIOS device number The BIOS must have been informed about the device via Bconmap, else any attempt to access the device will be punished with EUNDEV. Note: The opcodes marked with (*) here are only available under MagiC, all others only under MiNT or MultiTOS. Exceptions: The opcodes FUTIME and CDROMEJECT are avaiable both under MiNT/MultiTOS as well as under MagiC. (1): Unfortunately there were collisions between MagiC and the Minix-XFS for MiNT. Hence MagiC as of Version 6 contains new codes, though the old ones are still supported. The new codes have 0x6d in the upper WORD; this ID is reserved for MagiC. Return value: The return value depends on the desired operation and the underlying file-system. With a value >= 0 everything was successful. An exception is the value for DEV_INSTALL, which either points to an information structure of the kernel, or else has the value 0. For an invalid opcode, EINVFN will be returned. Availability: Available when a 'MiNT' cookie with a version of at least 0.90 exists, and MagiC as of Version 3.0. Group: Directory functions See also: Binding XFS-concept in MagiC Bconmap Fcntl MagiC Metaioctl