blob: 418d15f55b3cb70d0da18fb9d32d69b103753634 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
#include <u.h>
#include <libc.h>
#include <ctype.h>
#define Tfile Tfilescsi /* avoid name conflict */
#include <disk.h>
#undef Tfile
#include <bio.h>
#include <ip.h>
#include "dat.h"
#include "portfns.h"
#define CHAT(cp) ((cons.flags&chatflag) || \
((cp) && (((Chan*)(cp))->flags&chatflag)))
#define QID9P1(a,b) (Qid9p1){a,b}
#define SECOND(n) (n)
#define MINUTE(n) ((n)*SECOND(60))
#define HOUR(n) ((n)*MINUTE(60))
#define DAY(n) ((n)*HOUR(24))
enum {
QPDIR = 0x80000000L,
QPNONE = 0,
QPROOT = 1,
QPSUPER = 2,
FID1 = 1,
FID2 = 2,
MAXBIAS = SECOND(20),
TLOCK = MINUTE(5),
};
Uid* uid;
short* gidspace;
Lock printing;
Time tim;
File* files;
Wpath* wpaths;
Lock wpathlock;
char* errstr9p[MAXERR];
Chan* chans;
RWLock mainlock;
Timet fs_mktime;
Timet boottime;
Queue* serveq;
Queue* raheadq;
Rabuf* rabuffree;
QLock reflock;
Lock rabuflock;
Tlock tlocks[NTLOCK];
Lock tlocklock;
Device* devnone;
Startsb startsb[5];
int mballocs[MAXCAT];
/* from config block */
char service[50]; /* my name */
Filsys filsys[30]; /* named file systems */
/*
* these are only documentation, but putting them in the config block makes
* them visible. the real values are compiled into cwfs.
*/
typedef struct Fspar Fspar;
struct Fspar {
char* name;
long actual; /* compiled-in value */
long declared;
} fspar[];
ulong roflag;
ulong errorflag;
ulong chatflag;
ulong authdebugflag;
int noattach; /* attach is disabled */
int noauth; /* auth is disable */
int nonone; /* attach as none disabled */
int noatime; /* atime is disabled */
int noatimeset; /* noatime was changed (reset after dump) */
int allowed; /* allow wstat and disable permission checks
* for user or anyone when -1 */
int duallow; /* single user to allow du */
int readonly; /* disable writes if true */
int rawreadok; /* allow reading raw data */
File* flist[5003]; /* base of file structures */
Lock flock; /* manipulate flist */
long growacct[1000];
struct
{
RWLock uidlock;
Iobuf* uidbuf;
int flen;
int find;
} uidgc;
extern char statecall[];
extern char* wormscode[];
extern char* tagnames[];
|