]> andersk Git - moira.git/blobdiff - dbck/phase1.pc
Deal with entries in the nfsphys table having allocations bigger than
[moira.git] / dbck / phase1.pc
index e49fbcf1c8e44c749171bd726606bc13abb2dff2..0b35abbd2df62531894b4696a93942f3b07e2c79 100644 (file)
@@ -849,13 +849,14 @@ void phase1(void)
     out_of_mem("loading nfsphs");
 
   EXEC SQL DECLARE csr111 CURSOR FOR
-    SELECT nfsphys_id, dir, mach_id, allocated, modby FROM nfsphys;
+    SELECT nfsphys_id, dir, mach_id, TO_CHAR(allocated), modby FROM nfsphys;
   EXEC SQL OPEN csr111;
   while (1)
     {
       EXEC SQL BEGIN DECLARE SECTION;
-      int nfsphys_id, mach_id, allocated, modby;
+      int nfsphys_id, mach_id, modby;
       char dir[NFSPHYS_DIR_SIZE];
+      char allocated[39];
       EXEC SQL END DECLARE SECTION;
 
       EXEC SQL FETCH csr111 INTO :nfsphys_id, :dir, :mach_id,
@@ -869,7 +870,7 @@ void phase1(void)
       strcpy(n->dir, strtrim(dir));
       n->mach_id = mach_id;
       n->nfsphys_id = nfsphys_id;
-      n->allocated = allocated;
+      n->allocated = strtoull(allocated, NULL, 0);
       n->modby = modby;
       n->count = 0;
       retval = hash_store(nfsphys, nfsphys_id, n);
This page took 0.031362 seconds and 4 git commands to generate.