[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MiNT 1.12 doc/appendix.d as filesys.h (diffs)



here are some diffs for appendix.d from the MiNT 1.12 doc archive
(mint112d.zoo), it works as filesys.h for at least virtual consoles now...
(see next message)

extract appendix.d, patch (maybe strip CRs first...), then symlink
or copy as filesys.h into the virtual console source directory or
wherever your other sources will find it.  (should this go in
/usr/include/sys as standard?)

 so short :)
	Juergen
-- 
J"urgen Lock / nox@jelal.hb.north.de / UUCP: ..!uunet!unido!uniol!jelal!nox
								...ohne Gewehr
PGP public key fingerprint =  8A 18 58 54 03 7B FC 12  1F 8B 63 C7 19 27 CF DA 

===================================================================
RCS file: /usr/src/master/mint/doc/appendix.d,v
retrieving revision 1.1
diff -u -r1.1 appendix.d
--- 1.1	1994/12/30 13:06:26
+++ appendix.d	1995/01/15 17:58:38
@@ -1,4 +1,4 @@
-Appendix D: filesys.h
+/*Appendix D: filesys.h*/
 
 /*
  * Symbolic constants and structures for file system operations.
@@ -21,7 +21,10 @@
 # endif
 #endif
 
-#include "portab.h"	/* define WORD to be a 16 bit integer */
+#ifndef WORD		/* define WORD to be a 16 bit integer */
+# define WORD short	/* should work for any 68k compiler!? */
+#endif
+/*#include "portab.h"*/	/* (people without GEM libs don't have it...) */
 
 #define NAME_MAX 32
 #define PATH_MAX 128
@@ -77,7 +80,7 @@
 #define DEFAULT_MODE	(0666)
 	long	index;
 	unsigned short	dev;
-	unsigned short	reserved1;
+	unsigned short	rdev;
 	unsigned short	nlink;
 	unsigned short	uid;
 	unsigned short	gid;
@@ -132,7 +135,15 @@
 	long (*close)	P_((FILEPTR *f, WORD pid));
 	long (*select)	P_((FILEPTR *f, long proc, WORD mode));
 	void (*unselect) P_((FILEPTR *f, long proc, WORD mode));
-	long	reserved[3];	/* reserved for future use */
+/* extensions, check dev_descr.devdrvsiz (size of DEVDRV struct) before calling:
+ * fast RAW tty byte io  */
+	long (*writeb)	P_((FILEPTR *f, const char *buf, long bytes));
+	long (*readb)	P_((FILEPTR *f, char *buf, long bytes));
+	long reserved3; /* reserved for future use */
+/* what about: scatter/gather io for DMA devices...
+ *	long (*writev)	P_((FILEPTR *f, const struct iovec *iov, long cnt));
+ *	long (*readv)	P_((FILEPTR *f, const struct iovec *iov, long cnt));
+ */
 } DEVDRV;
 
 typedef struct filesys {
@@ -143,6 +154,8 @@
 #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" */
+#define FS_NO_C_CACHE	0x10	/* don't cache cookies for this filesystem */
+#define FS_DO_SYNC	0x20	/* file system has a sync function */
 
 	long	(*root) P_((WORD drv, fcookie *fc));
 	long	(*lookup) P_((fcookie *dir, char *name, fcookie *fc));
@@ -176,6 +189,7 @@
 	long	(*dskchng) P_((WORD drv));
 	long	(*release) P_((fcookie *fc));
 	long	(*dupcookie) P_((fcookie *dest, fcookie *src));
+	long	(*sync) P_((void));
 
 } FILESYS;
 
@@ -238,12 +252,12 @@
 	void	(*canceltimeout) P_((long));
 
 /* extended timeout functions; MiNT 1.11 and later only */
-	struct timeout * ARGS_ON_STACK (*addroottimeout) P_((long, void (*)(), short));
-	void	ARGS_ON_STACK (*cancelroottimeout) P_((struct timeout *));
+	struct timeout *(*addroottimeout) P_((long, void (*)(), short));
+	void	(*cancelroottimeout) P_((struct timeout *));
 
 /* miscellaneous other things: MiNT 1.12 and later only */
-	long	ARGS_ON_STACK (*ikill) P_((int, int));
-	void	ARGS_ON_STACK (*iwake) P_((int que, long cond, short pid));
+	long	(*ikill) P_((int, int));
+	void	(*iwake) P_((int que, long cond, short pid));
 
 /* reserved for future use */
 	long	res2[3];
@@ -364,9 +378,9 @@
 #define FSTAT		(('F'<< 8) | 0)	/* handled by kernel */
 #define FIONREAD	(('F'<< 8) | 1)
 #define FIONWRITE	(('F'<< 8) | 2)
+#define FIOEXCEPT	(('F'<< 8) | 5)
 #define TIOCGETP	(('T'<< 8) | 0)
-#define TIOCSETP	(('T'<< 8) | 1)
-#define TIOCSETN	TIOCSETP
+#define TIOCSETN	(('T'<< 8) | 1)
 #define TIOCGETC	(('T'<< 8) | 2)
 #define TIOCSETC	(('T'<< 8) | 3)
 #define TIOCGLTC	(('T'<< 8) | 4)
@@ -437,6 +451,8 @@
 #define T_CBREAK	0x0002
 #define T_ECHO		0x0004
 #define T_RAW		0x0010
+#define T_NOFLSH	0x0040		/* don't flush buffer when signals
+					   are received */
 #define T_TOS		0x0080
 #define T_TOSTOP	0x0100
 #define T_XKEY		0x0200		/* Fread returns escape sequences for
@@ -472,7 +488,10 @@
  * hasn't been read by Fread, and is an index into that escape sequence)
  */
 #define TS_ESC		0x00ff
+#define TS_BLIND	0x800		/* tty is `blind' i.e. has no carrier
+					   (cleared in local mode) */
 #define TS_HOLD		0x1000		/* hold (e.g. ^S/^Q) */
+#define TS_HPCL		0x4000		/* hang up on close */
 #define TS_COOKED	0x8000		/* interpret control chars */
 
 /* structures for terminals */
@@ -518,7 +537,8 @@
 	short		pgrp;		/* process group of terminal */
 	short		state;		/* terminal status, e.g. stopped */
 	short		use_cnt;	/* number of times terminal is open */
-	short		res1;		/* reserved for future expansion */
+	short		aux_cnt;	/* number of times terminal is open as
+					   /dev/aux */
 	struct sgttyb 	sg;
 	struct tchars 	tc;
 	struct ltchars 	ltc;
@@ -543,7 +563,8 @@
 	short	flags;
 	struct tty *tty;
 	long	devdrvsiz;		/* size of DEVDRV struct */
-	long	reserved[4];
+	long	fmode;
+	long	reserved2[2];
 };
 
 #define FS_INSTALL    0xf001  /* let the kernel know about the file system */
@@ -571,4 +592,20 @@
 #define	       FA_CHANGED	       0x20
 #endif
 
+/* 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... */
+	long	drvsize;		/* size of DEVDRV struct */
+};
+
 #endif /* _filesys_h */