DEVEL15-bucoord-64-bit-cleanup-20060701
authorChristopher Allen Wing <wingc@engin.umich.edu>
Mon, 31 Jul 2006 17:37:19 +0000 (17:37 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 31 Jul 2006 17:37:19 +0000 (17:37 +0000)
However, in bucoord/commands.c, bc_VolRestoreCmd(), bc_DiskRestoreCmd(),
bc_VolsetRestoreCmd(), and bc_DumpCmd() were passing '0' as arguments
instead of NULL.  Because there is no prototype for bc_StartDmpRst() this
results in a crash on 64-bit Linux.  (when running 'volrestore' from an
interactive backup session)

(cherry picked from commit 57ef7a5d999de2829e2f205f2308101819e7f08a)

src/bucoord/commands.c

index b7ae046..78c36bb 100644 (file)
@@ -1243,7 +1243,7 @@ bc_VolRestoreCmd(as, arock)
                       &destServ, destPartition, fromDate, newExt, oldFlag,
                       /*parentDump */ 0, /*dumpLevel */ 0,
                       bc_Restorer, ports, portCount,
-                      /*dumpSched */ 0, /*append */ 0, dontExecute);
+                      /*dumpSched */ NULL, /*append */ 0, dontExecute);
     if (code)
        com_err(whoami, code, "; Failed to queue restore");
 
@@ -1406,7 +1406,7 @@ bc_DiskRestoreCmd(as, arock)
                       &destServ, destPartition, fromDate, newExt, oldFlag,
                       /*parentDump */ 0, /*dumpLevel */ 0,
                       bc_Restorer, ports, portCount,
-                      /*dumpSched */ 0, /*append */ 0, dontExecute);
+                      /*dumpSched */ NULL, /*append */ 0, dontExecute);
     if (code)
        com_err(whoami, code, "; Failed to queue restore");
 
@@ -1564,11 +1564,11 @@ bc_VolsetRestoreCmd(as, arock)
 
     /* Perform the call to start the restore */
     code = bc_StartDmpRst(bc_globalConfig, "disk", "restore", volsToRestore,
-                         /*destserver */ 0, /*destpartition */ 0, fromDate,
+                         /*destserver */ NULL, /*destpartition */ 0, fromDate,
                          newExt, oldFlag,
                          /*parentDump */ 0, /*dumpLevel */ 0,
                          bc_Restorer, ports, portCount,
-                         /*dumpSched */ 0, /*append */ 0, dontExecute);
+                         /*dumpSched */ NULL, /*append */ 0, dontExecute);
     if (code)
        com_err(whoami, code, "; Failed to queue restore");
 
@@ -1962,7 +1962,7 @@ bc_DumpCmd(as, arock)
        return (0);
 
     code = bc_StartDmpRst(bc_globalConfig, dumpPath, vsName, volsToDump,
-                         /*destServer */ 0, /*destPartition */ 0,
+                         /*destServer */ NULL, /*destPartition */ 0,
                          /*fromDate */ 0,
                          /*newExt */ NULL, /*oldFlag */ 0,
                          parent, level, bc_Dumper, portp, /*portCount */ 1,