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;
22 extern struct hash *containers;
24 #define MAX_ID_VALUE 32765
25 #define MIN_ID_VALUE 100
27 #define dprintf if (debug) printf
30 char login[USERS_LOGIN_SIZE];
44 char name[MACHINE_NAME_SIZE];
57 char name[SUBNET_NAME_SIZE];
65 char name[CLUSTERS_NAME_SIZE];
71 char name[LIST_NAME_SIZE];
88 char name[FILESYS_LABEL_SIZE];
89 char dir[FILESYS_NAME_SIZE];
99 char dir[NFSPHYS_DIR_SIZE];
117 char name[CONTAINERS_NAME_SIZE];
128 void out_of_mem(char *msg);
131 void modified(char *table);
137 void count_only_setup(void);
139 /* prototypes from fix.pc */
140 void generic_delete(struct save_queue *sq, int (*pfunc)(void *), char *table,
141 char *idfield, int preen);
142 void single_delete(char *table, char *idfield, int id);
143 void zero_fix(char *tbl, char *zrfield, char *idfield, int id);
144 int single_fix(char *msg, int preen);
145 void generic_fix(struct save_queue *sq, int (*pfunc)(void *), char *msg,
146 void (*ffunc)(void *), int preen);
147 int prompt(char *msg);
148 int set_next_object_id(char *object, char *tablename);
149 int generic_fix_id(char *tbl, char *idfield, char *txtfield,
150 int oldid, char *name);
152 /* prototypes from phase3.pc */
153 struct string *string_check(int id);