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 131072
25 #define MIN_ID_VALUE 100
27 #define dprintf if (debug) printf
30 char login[USERS_LOGIN_SIZE];
46 char name[MACHINE_NAME_SIZE];
59 char name[SUBNET_NAME_SIZE];
67 char name[CLUSTERS_NAME_SIZE];
73 char name[LIST_NAME_SIZE];
90 char name[FILESYS_LABEL_SIZE];
91 char dir[FILESYS_NAME_SIZE];
101 char dir[NFSPHYS_DIR_SIZE];
104 unsigned long long allocated;
106 unsigned long long count;
119 char name[CONTAINERS_NAME_SIZE];
130 void out_of_mem(char *msg);
133 void modified(char *table);
139 void count_only_setup(void);
141 /* prototypes from fix.pc */
142 void generic_delete(struct save_queue *sq, int (*pfunc)(void *), char *table,
143 char *idfield, int preen);
144 void single_delete(char *table, char *idfield, int id);
145 void zero_fix(char *tbl, char *zrfield, char *idfield, int id);
146 int single_fix(char *msg, int preen);
147 void generic_fix(struct save_queue *sq, int (*pfunc)(void *), char *msg,
148 void (*ffunc)(void *), int preen);
149 int prompt(char *msg);
150 int set_next_object_id(char *object, char *tablename);
151 int generic_fix_id(char *tbl, char *idfield, char *txtfield,
152 int oldid, char *name);
154 /* prototypes from phase3.pc */
155 struct string *string_check(int id);