]> git.sur5r.net Git - bacula/bacula/commitdiff
Minor doc tweaks
authorKern Sibbald <kern@sibbald.com>
Thu, 17 Feb 2005 15:08:47 +0000 (15:08 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 17 Feb 2005 15:08:47 +0000 (15:08 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1832 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/dird/inc_conf.c
bacula/src/filed/job.c
bacula/src/filed/restore.c

index f5c584c4132f03823b6a5c4de221bc97c2646233..ccd7730253d446dc4f80c2a9ce3b5d71ad116e33 100644 (file)
@@ -30,6 +30,8 @@ Suggestions for Preben:
 - Optimized bootstrap.
 
 For 1.37:
+- Try to open a device on each Job if it was not opened
+  when the SD started.
 - Windows restore:
   data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
   > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
index 51f4ced8b8bb338a4aa40235489eb303d41d932a..80f0d2f3bbaeb7379d2bd99c156c1dd30851ea8a 100644 (file)
@@ -477,7 +477,7 @@ static void store_regex(LEX *lc, RES_ITEM *item, int index, int pass)
    int token, rc;
    regex_t preg;
    char prbuf[500];
-   char *type;
+   const char *type;
    int newsize;
 
    token = lex_get_token(lc, T_SKIP_EOL);
@@ -570,7 +570,7 @@ static void store_writer(LEX *lc, RES_ITEM *item, int index, int pass)
 static void store_wild(LEX *lc, RES_ITEM *item, int index, int pass)
 {
    int token;
-   char *type;
+   const char *type;
    int newsize;
 
    token = lex_get_token(lc, T_SKIP_EOL);
index d6faeadaa3d24edbb8640eff275877642a905331..6690d949c8c68fff8504f98dd4b50b0227aee19b 100644 (file)
@@ -58,7 +58,7 @@ static int open_sd_read_session(JCR *jcr);
 static int send_bootstrap_file(JCR *jcr);
 static int runbefore_cmd(JCR *jcr);
 static int runafter_cmd(JCR *jcr);
-static int run_cmd(JCR *jcr, char *cmd, const char *name);
+static bool run_cmd(JCR *jcr, char *cmd, const char *name);
 static void set_options(findFOPTS *fo, const char *opts);
 
 
@@ -208,7 +208,7 @@ void *handle_client_request(void *dirp)
            }
             Dmsg1(100, "Executing %s command.\n", cmds[i].cmd);
            if (!cmds[i].func(jcr)) {         /* do command */
-              quit = true;         /* error or fully terminated,       get out */
+              quit = true;         /* error or fully terminated, get out */
                Dmsg0(20, "Quit command loop due to command error or Job done.\n");
            }
            break;
@@ -412,7 +412,7 @@ static int job_cmd(JCR *jcr)
 
 static int runbefore_cmd(JCR *jcr)
 {
-   int stat;
+   bool ok;
    BSOCK *dir = jcr->dir_bsock;
    POOLMEM *cmd = get_memory(dir->msglen+1);
 
@@ -427,9 +427,9 @@ static int runbefore_cmd(JCR *jcr)
    unbash_spaces(cmd);
 
    /* Run the command now */
-   stat = run_cmd(jcr, cmd, "ClientRunBeforeJob");
+   ok = run_cmd(jcr, cmd, "ClientRunBeforeJob");
    free_memory(cmd);
-   if (stat) {
+   if (ok) {
       bnet_fsend(dir, OKRunBefore);
       return 1;
    } else {
@@ -461,7 +461,7 @@ static int runafter_cmd(JCR *jcr)
    return bnet_fsend(dir, OKRunAfter);
 }
 
-static int run_cmd(JCR *jcr, char *cmd, const char *name)
+static bool run_cmd(JCR *jcr, char *cmd, const char *name)
 {
    POOLMEM *ecmd = get_pool_memory(PM_FNAME);
    int status;
@@ -475,23 +475,23 @@ static int run_cmd(JCR *jcr, char *cmd, const char *name)
       berrno be;
       Jmsg(jcr, M_FATAL, 0, _("%s could not execute. ERR=%s\n"), name,
         be.strerror());
-      return 0;
+      return false;
    }
    while (fgets(line, sizeof(line), bpipe->rfd)) {
       int len = strlen(line);
-      if (len > 0 && line[len-1] != '\n') {
-         bstrncat(line, "\n", sizeof(line));
+      if (len > 0 && line[len-1] == '\n') {
+        line[len-1] = 0;
       }
-      Jmsg(jcr, M_INFO, 0, _("%s: %s"), name, line);
+      Jmsg(jcr, M_INFO, 0, _("%s: %s\n"), name, line);
    }
    status = close_bpipe(bpipe);
    if (status != 0) {
       berrno be;
       Jmsg(jcr, M_FATAL, 0, _("%s returned non-zero status=%d. ERR=%s\n"), name,
         status, be.strerror(status));
-      return 0;
+      return false;
    }
-   return 1;
+   return true;
 }
 
 
@@ -691,6 +691,7 @@ static void add_file_to_fileset(JCR *jcr, const char *fname, findFILESET *filese
       }
       break;
    case '<':
+      Dmsg0(100, "Doing < include on client.\n");
       p++;                     /* skip over < */
       if ((ffd = fopen(p, "r")) == NULL) {
         berrno be;
@@ -700,6 +701,7 @@ static void add_file_to_fileset(JCR *jcr, const char *fname, findFILESET *filese
       }
       while (fgets(buf, sizeof(buf), ffd)) {
         strip_trailing_junk(buf);
+         Dmsg1(100, "%s\n", buf);
         fileset->incexe->name_list.append(bstrdup(buf));
       }
       fclose(ffd);
index c3bcf1ca51c631320fd3c8990469c0d6498aeba8..fe3c00afba276b37d66d46fad71229ee135d189b 100644 (file)
@@ -72,7 +72,8 @@ int bclose_chksize(JCR *jcr, BFILE *bfd, off_t osize)
 void do_restore(JCR *jcr)
 {
    BSOCK *sd;
-   int32_t stream, prev_stream;
+   int32_t stream = 0;
+   int32_t prev_stream;
    uint32_t VolSessionId, VolSessionTime;
    bool extract = false;
    int32_t file_index;