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];
85 char name[FILESYS_LABEL_SIZE];
86 char dir[FILESYS_NAME_SIZE];
96 char dir[NFSPHYS_DIR_SIZE];
114 void out_of_mem(char *msg);
117 void modified(char *table);
123 void count_only_setup(void);
125 /* prototypes from fix.pc */
126 void generic_delete(struct save_queue *sq, int (*pfunc)(void *), char *table,
127 char *idfield, int preen);
128 void single_delete(char *table, char *idfield, int id);
129 void zero_fix(char *tbl, char *zrfield, char *idfield, int id);
130 int single_fix(char *msg, int preen);
131 void generic_fix(struct save_queue *sq, int (*pfunc)(void *), char *msg,
132 void (*ffunc)(void *), int preen);
133 int prompt(char *msg);
134 int set_next_object_id(char *object, char *tablename);
135 int generic_fix_id(char *tbl, char *idfield, char *txtfield,
136 int oldid, char *name);
138 /* prototypes from phase3.pc */
139 struct string *string_check(int id);