3 * Declarations for Moira database consistancy checker
5 * (c) Copyright 1988 by the Massachusetts Institute of Technology.
6 * For copying and distribution information, please see the file
10 #include <mit-copyright.h>
11 #include <moira_site.h>
12 #include <moira_schema.h>
19 extern int debug, mode, fast, dcmenable, warn;
20 extern struct hash *users, *machines, *clusters, *lists, *printservers;
21 extern struct hash *filesys, *nfsphys, *strings, *subnets, *string_dups;
23 #define MAX_ID_VALUE 32765
24 #define MIN_ID_VALUE 100
26 #define dprintf if (debug) printf
29 char login[USERS_LOGIN_SIZE];
43 char name[MACHINE_NAME_SIZE];
56 char name[SUBNET_NAME_SIZE];
64 char name[CLUSTERS_NAME_SIZE];
70 char name[LIST_NAME_SIZE];
87 char name[FILESYS_LABEL_SIZE];
88 char dir[FILESYS_NAME_SIZE];
98 char dir[NFSPHYS_DIR_SIZE];
116 void out_of_mem(char *msg);
119 void modified(char *table);
125 void count_only_setup(void);
127 /* prototypes from fix.pc */
128 void generic_delete(struct save_queue *sq, int (*pfunc)(void *), char *table,
129 char *idfield, int preen);
130 void single_delete(char *table, char *idfield, int id);
131 void zero_fix(char *tbl, char *zrfield, char *idfield, int id);
132 int single_fix(char *msg, int preen);
133 void generic_fix(struct save_queue *sq, int (*pfunc)(void *), char *msg,
134 void (*ffunc)(void *), int preen);
135 int prompt(char *msg);
136 int set_next_object_id(char *object, char *tablename);
137 int generic_fix_id(char *tbl, char *idfield, char *txtfield,
138 int oldid, char *name);
140 /* prototypes from phase3.pc */
141 struct string *string_check(int id);