]> git.lizzy.rs Git - plan9front.git/blob - sys/src/cmd/replica/all.h
ip/cifsd: dont return garbage in upper 32 bit of unix extension stat fields
[plan9front.git] / sys / src / cmd / replica / all.h
1 #include <u.h>
2 #include <libc.h>
3 #include <bio.h>
4 #include <disk.h>
5 #include <avl.h>
6
7 /* db.c */
8 typedef struct Db Db;
9 typedef struct Entry Entry;
10 struct Entry
11 {
12         Avl;
13         char *name;
14         struct {
15                 char *name;
16                 char *uid;
17                 char *gid;
18                 ulong mtime;
19                 ulong mode;
20                 int mark;
21                 vlong length;
22         } d;
23 };
24
25
26 typedef struct Db Db;
27 struct Db
28 {
29         Avltree *avl;
30         int fd;
31 };
32 Db *opendb(char*);
33 int finddb(Db*, char*, Dir*);
34 void removedb(Db*, char*);
35 void insertdb(Db*, char*, Dir*);
36 int markdb(Db*, char*, Dir*);
37
38 /* util.c */
39 void *erealloc(void*, int);
40 void *emalloc(int);
41 char *estrdup(char*);
42 char *atom(char*);
43 char *unroot(char*, char*);
44
45 /* revproto.c */
46 int revrdproto(char*, char*, char*, Protoenum*, Protowarn*, void*);
47