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;
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];
85 char name[FILESYS_LABEL_SIZE];
86 char dir[FILESYS_NAME_SIZE];
96 char dir[NFSPHYS_DIR_SIZE];
105 void out_of_mem(char *msg);
108 void modified(char *table);
114 void count_only_setup(void);
116 /* prototypes from fix.pc */
117 void generic_delete(struct save_queue *sq, int (*pfunc)(void *), char *table,
118 char *idfield, int preen);
119 void single_delete(char *table, char *idfield, int id);
120 void zero_fix(char *tbl, char *zrfield, char *idfield, int id);
121 int single_fix(char *msg, int preen);
122 void generic_fix(struct save_queue *sq, int (*pfunc)(void *), char *msg,
123 void (*ffunc)(void *), int preen);
124 int prompt(char *msg);
125 int set_next_object_id(char *object, char *tablename);
126 int generic_fix_id(char *tbl, char *idfield, char *txtfield,
127 int oldid, char *name);
129 /* prototypes from phase3.pc */
130 struct string *string_check(int id);