]> git.sur5r.net Git - bacula/bacula/commitdiff
Misc updates
authorKern Sibbald <kern@sibbald.com>
Sun, 20 Jun 2004 20:16:58 +0000 (20:16 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 20 Jun 2004 20:16:58 +0000 (20:16 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1432 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/console/console_conf.c
bacula/src/gnome2-console/console_conf.c
bacula/src/lib/signal.c
bacula/src/win32/compat/compat.cpp

index c7de681b1ba0ebd57e8438567e5265a435067d0b..191b94ec605070f6d8fccb1a236ba4b0b7ca94b7 100644 (file)
@@ -1,10 +1,16 @@
                  Kern's ToDo List
-                  10 June 2004
+                  20 June 2004
 
 1.35 Items to do:
 - Implement SIGHUP in Dir
   (Implement resources on a single pointer)
+- Make btape release the drive during the "test" append.
 - Do tape alerts -- see tapealert.txt
+- Revisit and revise Disaster Recovery (fix SCSI and RAID 
+  disk detection)
+- Document a get out of jail procedure if everything breaks if 
+  you lost/broke the Catalog -- do the same for "I know my
+  file is there how do I get it back?".
 - When restore started from console, report jobid.
 - Win32 inc problem when new directory added.
 - On Win95
@@ -62,8 +68,6 @@ Wish list:
 - Add priority to Scheduled jobs status listing.
 - Add multiple-media-types.txt
 - look at mxt-changer.html
-- Document a get out of jail procedure if everything breaks if you lost/broke
-  the Catalog.
 - Make ? do a help command (no return needed).
 - Implement restore directory.
 - Add All Local Partitions = yes to new style saves.
@@ -1078,4 +1082,3 @@ Block Position: 0
 - Implement fast tree insert (doubly linked list?)
 - Disallow using Internal database
 - Feedback while the tree is being built.    
-
index 6fbfbe75d3281930bf393230d8737acf3414d977..9ae6cad4f937650fcf28e47ebd3090d6c46a2d5f 100644 (file)
@@ -109,7 +109,7 @@ RES_TABLE resources[] = {
 void dump_resource(int type, RES *reshdr, void sendit(void *sock, const char *fmt, ...), void *sock)
 {
    URES *res = (URES *)reshdr;
-   int recurse = 1;
+   bool recurse = true;
 
    if (res == NULL) {
       printf("No record for %d %s\n", type, res_to_str(type));
@@ -117,7 +117,7 @@ void dump_resource(int type, RES *reshdr, void sendit(void *sock, const char *fm
    }
    if (type < 0) {                   /* no recursion */
       type = - type;
-      recurse = 0;
+      recurse = false;
    }
    switch (type) {
       case R_CONSOLE:
index c2873f39411cf226a2025260973dab14fcd9ae18..84cc55e7ad8d3cc2ebd6b30ea6352e3c765a182c 100644 (file)
@@ -108,7 +108,7 @@ RES_TABLE resources[] = {
 void dump_resource(int type, RES *reshdr, void sendit(void *sock, const char *fmt, ...), void *sock)
 {
    URES *res = (URES *)reshdr;
-   int recurse = 1;
+   bool recurse = true;
 
    if (res == NULL) {
       printf("No record for %d %s\n", type, res_to_str(type));
@@ -116,7 +116,7 @@ void dump_resource(int type, RES *reshdr, void sendit(void *sock, const char *fm
    }
    if (type < 0) {                   /* no recursion */
       type = - type;
-      recurse = 0;
+      recurse = false;
    }
    switch (type) {
    case R_DIRECTOR:
index c9216ac9269b050c0d49493b3da9db50a381f5cd..74091e75c187087baab82a11ba3bde99c773769d 100644 (file)
@@ -58,24 +58,16 @@ static pid_t main_pid = 0;
 /* 
  * Handle signals here
  */
-extern "C" {
-    static void signal_handler(int sig);
-}
-
-static void signal_handler(int sig)
+extern "C" void signal_handler(int sig)
 {
    static int already_dead = 0;
 
    /* If we come back more than once, get out fast! */
-   if (already_dead > 1) {
-      exit(1);
-   }
-   /* If we come back once, take normal exit */
    if (already_dead) {
       exit(1);
    }
    Dmsg2(200, "sig=%d %s\n", sig, sig_names[sig]);
-   /* Ignore certain signals */
+   /* Ignore certain signals -- SIGUSR2 used to interrupt threads */
    if (sig == SIGCHLD || sig == SIGUSR2) {
       return;
    }
index c525fdaef8b711d2a1e53ac214c042408de12710..80a77f578d8152f78a349974c01b3064d599c5dd 100644 (file)
@@ -17,7 +17,7 @@
 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 //   General Public License for more details.
 //
-//   You should have received a copcloy of the GNU General Public
+//   You should have received a copy of the GNU General Public
 //   License along with this program; if not, write to the Free
 //   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 //   MA 02111-1307, USA.
@@ -36,7 +36,7 @@
 extern void d_msg(const char *file, int line, int level, const char *fmt,...);
 extern DWORD   g_platform_id;
 
-// from CYGWIN (should be diff between Jan 1 1601 and Jan 1 1970
+// from MicroSoft SDK (KES) is the diff between Jan 1 1601 and Jan 1 1970
 #ifdef HAVE_MINGW
 #define WIN32_FILETIME_ADJUST 0x19DB1DED53E8000UL //Not sure it works
 #else
@@ -452,7 +452,7 @@ strncasecmp(const char *s1, const char *s2, int len)
         ch2 = *s2;
         s1++;
         s2++;
-       if (ch1 == 0 || tolower(ch1) != tolower(ch2)) break;
+        if (ch1 == 0 || tolower(ch1) != tolower(ch2)) break;
     } 
 
     return(ch1 - ch2);
@@ -794,14 +794,14 @@ getArgv0(const char *cmdline)
     int inquote = 0;
     for (const char *cp = cmdline; *cp; cp++)
     {
-       if (*cp == '"') {
-           inquote = !inquote;
-       }
-       if (!inquote && isspace(*cp))
-           break;
+        if (*cp == '"') {
+            inquote = !inquote;
+        }
+        if (!inquote && isspace(*cp))
+            break;
     }
 
-       
+        
     int len = cp - cmdline;
     char *rval = (char *)malloc(len+1);
 
@@ -862,7 +862,7 @@ CreateChildProcess(const char *cmdline, HANDLE in, HANDLE out, HANDLE err)
     const char *comspec = getenv("COMSPEC");
     
     if (comspec == NULL) // should never happen
-       return INVALID_HANDLE_VALUE;
+        return INVALID_HANDLE_VALUE;
 
     char *cmdLine = (char *)alloca(strlen(cmdline) + strlen(comspec) + 16);
     
@@ -973,7 +973,7 @@ open_bpipe(char *prog, int wait, const char *mode)
         }
 
         CloseHandle(hChildStdoutRd);
-       hChildStdoutRd = INVALID_HANDLE_VALUE;
+        hChildStdoutRd = INVALID_HANDLE_VALUE;
     }
 
     if (mode_write) {
@@ -997,7 +997,7 @@ open_bpipe(char *prog, int wait, const char *mode)
         }
 
         CloseHandle(hChildStdinWr);
-       hChildStdinWr = INVALID_HANDLE_VALUE;
+        hChildStdinWr = INVALID_HANDLE_VALUE;
     }
     // spawn program with redirected handles as appropriate
     bpipe->worker_pid = (pid_t)
@@ -1164,7 +1164,7 @@ close(int fd)
 {
     int rval = _close(fd);
     if (rval == -1)
-       rval = closesocket(fd);
+        rval = closesocket(fd);
     return rval;
 }