--- MiNT/src/file.h 2018/04/24 17:56:33 1.1.1.3 +++ MiNT/src/file.h 2018/04/24 17:58:10 1.1.1.5 @@ -2,7 +2,7 @@ Copyright 1991,1992 Eric R. Smith. -Copyright 1992 Atari Corporation. +Copyright 1992,1993,1994 Atari Corporation. All rights reserved. @@ -20,6 +20,8 @@ struct filesys; /* forward declaration struct devdrv; /* ditto */ +struct timeout; /* and ditto */ + typedef struct f_cookie { @@ -158,7 +160,7 @@ typedef struct xattr { ushort dev; - ushort reserved1; + ushort rdev; /* "real" device */ ushort nlink; @@ -464,7 +466,7 @@ struct kerinfo { void ARGS_ON_STACK (*nap) P_((unsigned)); - void ARGS_ON_STACK (*sleep) P_((int que, long cond)); + int ARGS_ON_STACK (*sleep) P_((int que, long cond)); void ARGS_ON_STACK (*wake) P_((int que, long cond)); @@ -476,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 *)); + + + +/* reserved for future use */ - long res2[9]; + long res2[7]; }; @@ -712,6 +722,8 @@ struct kerinfo { #define TIOCSFLAGS (('T'<< 8) | 23) +#define TIOCOUTQ (('T'<< 8) | 24) + /* cursor control Fcntls: @@ -772,6 +784,26 @@ struct kerinfo { #define PTRACE11 (('P'<< 8) | 11) +#define PLOADINFO (('P'<< 8) | 12) + +#define PFSTAT (('P'<< 8) | 13) + + + +struct ploadinfo { + + /* passed */ + + short fnamelen; + + /* returned */ + + char *cmdlin, *fname; + +}; + + + #define SHMGETBLK (('M'<< 8) | 0) @@ -1000,6 +1032,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]; + +}; + + + + + /* number of BIOS drives */ #define NUM_DRIVES 32 @@ -1026,7 +1088,19 @@ struct dev_descr { -#define PROC_BASE_DEV 0xA000 +/* various fields for the "rdev" device numbers */ + +#define BIOS_DRIVE_RDEV 0x0000 + +#define BIOS_RDEV 0x0100 + +#define FAKE_RDEV 0x0200 + +#define PIPE_RDEV 0x7e00 + +#define UNK_RDEV 0x7f00 + +#define PROC_RDEV_BASE 0xa000 @@ -1046,5 +1120,35 @@ extern char follow_links[]; +/* internal bios file structure */ + + + +#define BNAME_MAX 13 + + + +struct bios_file { + + char name[BNAME_MAX+1]; /* device name */ + + DEVDRV *device; /* device driver for device */ + + short private; /* extra info for device driver */ + + ushort flags; /* flags for device open */ + + struct tty *tty; /* tty structure (if appropriate) */ + + struct bios_file *next; + + short lockpid; /* owner of the lock */ + + XATTR xattr; /* guess what... */ + +}; + + + #endif /* _filesys_h */