diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2000-06-17 17:16:08 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2000-06-17 17:16:08 +0000 |
commit | 883d8fd44467302c3565033377329596ff584353 (patch) | |
tree | 6a4fab996854c794c5bbb82961a34807efb5bdb0 /sys/miscfs/tcfs/tcfs_fileinfo.h | |
parent | e5891f818a179b348802443c30c18b6ab4adfed8 (diff) |
initial import of tcfs.
Diffstat (limited to 'sys/miscfs/tcfs/tcfs_fileinfo.h')
-rw-r--r-- | sys/miscfs/tcfs/tcfs_fileinfo.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sys/miscfs/tcfs/tcfs_fileinfo.h b/sys/miscfs/tcfs/tcfs_fileinfo.h new file mode 100644 index 00000000000..e64eff4fc75 --- /dev/null +++ b/sys/miscfs/tcfs/tcfs_fileinfo.h @@ -0,0 +1,34 @@ +/* Gestione informazioni sui files cifrati +*/ + + +typedef struct { + unsigned long flag; + unsigned int end_of_file; + } tcfs_fileinfo; + +#define MBFLAG 0x00000010 +#define SPFLAG 0x000000e0 +#define GSFLAG 0x00000100 + +#define FI_CFLAG(x) (((x)->flag&MBFLAG)>>4) +#define FI_SPURE(x) (((x)->flag&SPFLAG)>>5) +#define FI_GSHAR(x) (((x)->flag&GSFLAG)>>8) +#define FI_ENDOF(x) ((x)->end_of_file) + +#define FI_SET_CF(x,y) ((x)->flag=\ + ((x)->flag & (~MBFLAG))|((y<<4)&MBFLAG)) + +#define FI_SET_SP(x,y) ((x)->flag=\ + ((x)->flag & (~SPFLAG))|((y<<5)&SPFLAG)) + +#define FI_SET_GS(x,y) ((x)->flag=\ + ((x)->flag & (~GSFLAG))|((y<<8)&GSFLAG)) + +/* prototipi */ + +tcfs_fileinfo tcfs_get_fileinfo(void *); +tcfs_fileinfo tcfs_xgetflags(struct vnode *,struct proc *,struct ucred*); +int tcfs_set_fileinfo(void *, tcfs_fileinfo *); +int tcfs_xsetflags(struct vnode *, struct proc *, struct ucred *, tcfs_fileinfo *); + |