]> andersk Git - moira.git/blobdiff - dbck/dbck.qc
have string_check return the string structure instead of just 1
[moira.git] / dbck / dbck.qc
index 407e1cdd88ea1ca4d593034dc74c406dee1ac187..b950375935c556b5467fc7c0de978855b3dbd0c0 100644 (file)
 static char dbck_qc_rcsid[] = "$Header$";
 
 
-int debug = 1;
+int debug = 0;
 int mode = MODE_ASK;
 int fast = 0;
-struct hash *users, *machines, *clusters, *lists, *filesys, *nfsphys, *strings;
+int warn = 1;
+int abort = 0;
+struct hash *users, *machines, *clusters, *lists, *filesys, *nfsphys;
+struct hash *strings, *members;
 ##int dcmenable;
-struct save_queue *modtables;
+struct save_queue *modtables, *sq_create();
 int interrupt();
 
 
@@ -61,6 +64,13 @@ char **argv;
          case 'f':
              fast++;
              break;
+         case 'w':
+             warn = 0;
+             break;
+         default:
+             printf("Usage: %s [-d level] [-n] [-y] [-p] [-a] [-c] [-f] [-w] [database]\n",
+                    argv[0]);
+             exit(1);
          }
        else
          database = *arg;
@@ -114,7 +124,10 @@ int        *num;
 {
     printf("An ingres error occuurred, code %d\n", *num);
     printf("Aborting...\n");
-##  abort
+    if (!abort) {
+       abort++;
+##     abort
+    }
     exit(1);
 }
 
@@ -123,12 +136,19 @@ int interrupt()
 ##{
     printf("Signal caught\n");
     if (prompt("Save database changes")) {
+       /* break out of a retrieve loop */
+       IIbreak();
 ##     end transaction
        cleanup();
        exit(0);
     }
     printf("Aborting transaction\n");
-##  abort
+    if (!abort) {
+       abort++;
+       /* break out of a retrieve loop */
+       IIbreak();
+##     abort
+    }
 ##  replace values (value = dcmenable) where values.name = "dcm_enable"
 ##  exit
     exit(0);
@@ -151,3 +171,13 @@ cleanup()
 ##  replace values (value = dcmenable) where values.name = "dcm_enable"
 ##  exit
 ##}
+
+
+out_of_mem(msg)
+char *msg;
+{
+    fprintf(stderr, "Out of memory while %s\n", msg);
+##  end transaction    
+    cleanup();
+    exit(1);
+}
This page took 0.036687 seconds and 4 git commands to generate.