Imported Debian patch 2.5.2p1-1
[debian/amanda] / client-src / sendbackup-gnutar.c
index 5c7fe247ec6ef66b66fe47809688e7db1d28886c..d9c5e2001d2b350d3c3f18fbff2fb89a5505c0d3 100644 (file)
@@ -36,7 +36,7 @@
 #include "util.h"
 #include "getfsent.h"                  /* for amname_to_dirname lookup */
 #include "version.h"
-#include "clientconf.h"
+#include "conffile.h"
 
 #ifdef SAMBA_CLIENT
 #include "findpass.h"
@@ -44,7 +44,7 @@
 
 static amregex_t re_table[] = {
   /* tar prints the size in bytes */
-  AM_SIZE_RE("^ *Total bytes written: [0-9][0-9]*", 1),
+  AM_SIZE_RE("^ *Total bytes written: [0-9][0-9]*", 1, 1),
   AM_NORMAL_RE("^Elapsed time:"),
   AM_NORMAL_RE("^Throughput"),
 
@@ -182,10 +182,10 @@ start_backup(
        encpid = -1;
     } 
      /*  now do the client-side compression */
-    if(options->compress == COMPR_FAST || options->compress == COMPR_BEST) {
+    if(options->compress == COMP_FAST || options->compress == COMP_BEST) {
           compopt = skip_argument;
 #if defined(COMPRESS_BEST_OPT) && defined(COMPRESS_FAST_OPT)
-       if(options->compress == COMPR_BEST) {
+       if(options->compress == COMP_BEST) {
            compopt = COMPRESS_BEST_OPT;
        } else {
            compopt = COMPRESS_FAST_OPT;
@@ -200,7 +200,7 @@ start_backup(
            dbprintf((" %s", compopt));
        }
        dbprintf(("\n"));
-     } else if (options->compress == COMPR_CUST) {
+     } else if (options->compress == COMP_CUST) {
         compopt = skip_argument;
        comppid = pipespawn(options->clntcompprog, STDIN_PIPE,
                            &dumpout, &compout, &mesgf,
@@ -216,7 +216,7 @@ start_backup(
        comppid = -1;
     }
 
-    gnutar_list_dir = client_getconf_str(CLN_GNUTAR_LIST_DIR);
+    gnutar_list_dir = getconf_str(CNF_GNUTAR_LIST_DIR);
     if (strlen(gnutar_list_dir) == 0)
        gnutar_list_dir = NULL;
 
@@ -329,7 +329,7 @@ start_backup(
 
     /* find previous dump time */
 
-    amandates_file = client_getconf_str(CLN_AMANDATES);
+    amandates_file = getconf_str(CNF_AMANDATES);
     if(!start_amandates(amandates_file, 0)) {
        error("error [opening %s: %s]", amandates_file, strerror(errno));
        /*NOTREACHED*/
@@ -360,12 +360,13 @@ start_backup(
     cur_dumptime = time(0);
     cur_level = level;
     cur_disk = stralloc(disk);
-    indexcmd = vstralloc(
 #ifdef GNUTAR
-                        GNUTAR,
+#  define PROGRAM_GNUTAR GNUTAR
 #else
-                        "tar",
+#  define PROGRAM_GNUTAR "tar"
 #endif
+    indexcmd = vstralloc(
+                        PROGRAM_GNUTAR,
                         " -tf", " -",
                         " 2>/dev/null",
                         " | sed", " -e",