--- MiNT/src/file.h 2018/04/24 17:55:53 1.1.1.2 +++ MiNT/src/file.h 2018/04/24 17:57:21 1.1.1.4 @@ -1,6 +1,10 @@ /* -Copyright 1991,1992 Eric R. Smith. All rights reserved. +Copyright 1991,1992 Eric R. Smith. + +Copyright 1992,1993 Atari Corporation. + +All rights reserved. */ @@ -16,6 +20,8 @@ struct filesys; /* forward declaration struct devdrv; /* ditto */ +struct timeout; /* and ditto */ + typedef struct f_cookie { @@ -62,7 +68,7 @@ typedef struct dtabuf { long dta_size; - char dta_name[TOS_NAMELEN]; + char dta_name[TOS_NAMELEN+1]; } DTABUF; @@ -84,6 +90,10 @@ typedef struct dirstruct { /* NOTE: this must be at least 45 bytes */ + struct dirstruct *next; /* linked together so we can close them + + on process termination */ + } DIR; @@ -292,7 +302,9 @@ typedef struct filesys { #define FS_NOXBIT 0x04 /* if a file can be read, it can be executed */ +#define FS_LONGPATH 0x08 /* file system understands "size" argument to + "getname" */ long ARGS_ON_STACK (*root) P_((int drv, fcookie *fc)); @@ -318,7 +330,9 @@ typedef struct filesys { long ARGS_ON_STACK (*remove) P_((fcookie *dir, const char *name)); - long ARGS_ON_STACK (*getname) P_((fcookie *relto, fcookie *dir, char *pathname)); + long ARGS_ON_STACK (*getname) P_((fcookie *relto, fcookie *dir, + + char *pathname, int size)); long ARGS_ON_STACK (*rename) P_((fcookie *olddir, char *oldname, @@ -352,7 +366,9 @@ typedef struct filesys { long ARGS_ON_STACK (*dskchng) P_((int drv)); - long zero; + long ARGS_ON_STACK (*release) P_((fcookie *)); + + long ARGS_ON_STACK (*dupcookie) P_((fcookie *new, fcookie *old)); } FILESYS; @@ -462,13 +478,21 @@ struct kerinfo { int ARGS_ON_STACK (*denyshare) P_((FILEPTR *, FILEPTR *)); + LOCK * ARGS_ON_STACK (*denylock) P_((LOCK *, LOCK *)); -/* reserved for future use */ - LOCK * ARGS_ON_STACK (*denylock) P_((LOCK *, LOCK *)); +/* functions for adding/cancelling timeouts */ + + struct timeout * ARGS_ON_STACK (*addtimeout) P_((long, void (*)())); + + void ARGS_ON_STACK (*canceltimeout) P_((struct timeout *)); - long res2[9]; + + +/* reserved for future use */ + + long res2[7]; }; @@ -758,6 +782,24 @@ struct kerinfo { #define PTRACE11 (('P'<< 8) | 11) +#define PLOADINFO (('P'<< 8) | 12) + + + +struct ploadinfo { + + /* passed */ + + short fnamelen; + + /* returned */ + + char *cmdlin, *fname; + +}; + + + #define SHMGETBLK (('M'<< 8) | 0) @@ -982,6 +1024,36 @@ struct dev_descr { }; + + + + +#define FS_INSTALL 0xf001 /* let the kernel know about the file system */ + +#define FS_MOUNT 0xf002 /* make a new directory for a file system */ + +#define FS_UNMOUNT 0xf003 /* remove a directory for a file system */ + +#define FS_UNINSTALL 0xf004 /* remove a file system from the list */ + + + + + +struct fs_descr + +{ + + FILESYS *file_system; + + short dev_no; /* this is filled in by MiNT if arg == FS_MOUNT*/ + + long flags; + + long reserved[4]; + +}; +