]> git.sur5r.net Git - bacula/bacula/commitdiff
First cut AutoPrune
authorKern Sibbald <kern@sibbald.com>
Sun, 19 May 2002 07:38:06 +0000 (07:38 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 19 May 2002 07:38:06 +0000 (07:38 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@25 91ce42f0-d328-0410-95d8-f526ca767f89

135 files changed:
bacula/Makefile.in
bacula/src/Makefile.in
bacula/src/baconfig.h
bacula/src/bacula.h
bacula/src/bc_types.h
bacula/src/cats/bdb.c
bacula/src/cats/bdb_create.c
bacula/src/cats/bdb_delete.c
bacula/src/cats/bdb_find.c
bacula/src/cats/bdb_get.c
bacula/src/cats/bdb_list.c
bacula/src/cats/bdb_update.c
bacula/src/cats/cats.h
bacula/src/cats/mysql.c
bacula/src/cats/protos.h
bacula/src/cats/sql.c
bacula/src/cats/sql_create.c
bacula/src/cats/sql_delete.c
bacula/src/cats/sql_find.c
bacula/src/cats/sql_get.c
bacula/src/cats/sql_list.c
bacula/src/cats/sql_update.c
bacula/src/cats/sqlite.c
bacula/src/console/Makefile.in
bacula/src/console/console.c
bacula/src/console/console_conf.h
bacula/src/dird/Makefile.in
bacula/src/dird/authenticate.c
bacula/src/dird/backup.c
bacula/src/dird/catreq.c
bacula/src/dird/dird.c
bacula/src/dird/dird.h
bacula/src/dird/dird_conf.c
bacula/src/dird/dird_conf.h
bacula/src/dird/fd_cmds.c
bacula/src/dird/getmsg.c
bacula/src/dird/job.c
bacula/src/dird/mountreq.c
bacula/src/dird/msgchan.c
bacula/src/dird/newvol.c
bacula/src/dird/protos.h
bacula/src/dird/restore.c
bacula/src/dird/run_conf.c
bacula/src/dird/scheduler.c
bacula/src/dird/ua.h
bacula/src/dird/ua_cmds.c
bacula/src/dird/ua_dotcmds.c
bacula/src/dird/ua_input.c
bacula/src/dird/ua_output.c
bacula/src/dird/ua_prune.c
bacula/src/dird/ua_purge.c
bacula/src/dird/ua_run.c
bacula/src/dird/ua_select.c
bacula/src/dird/ua_server.c
bacula/src/dird/ua_status.c
bacula/src/dird/verify.c
bacula/src/filed/authenticate.c
bacula/src/filed/backup.c
bacula/src/filed/estimate.c
bacula/src/filed/filed.c
bacula/src/filed/filed.h
bacula/src/filed/filed_conf.c
bacula/src/filed/filed_conf.h
bacula/src/filed/job.c
bacula/src/filed/protos.h
bacula/src/filed/restore.c
bacula/src/filed/status.c
bacula/src/filed/verify.c
bacula/src/jcr.h
bacula/src/lib/alloc.c
bacula/src/lib/base64.c
bacula/src/lib/bits.h
bacula/src/lib/bnet.c
bacula/src/lib/bnet_server.c
bacula/src/lib/bshm.c
bacula/src/lib/bshm.h
bacula/src/lib/bsock.h
bacula/src/lib/btime.c
bacula/src/lib/btime.h
bacula/src/lib/cram-md5.c
bacula/src/lib/crc32.c
bacula/src/lib/daemon.c
bacula/src/lib/events.c
bacula/src/lib/hmac.c
bacula/src/lib/jcr.c
bacula/src/lib/lex.c
bacula/src/lib/lex.h
bacula/src/lib/lib.h
bacula/src/lib/md5.c
bacula/src/lib/md5.h
bacula/src/lib/mem_pool.c
bacula/src/lib/mem_pool.h
bacula/src/lib/message.c
bacula/src/lib/message.h
bacula/src/lib/parse_conf.c
bacula/src/lib/parse_conf.h
bacula/src/lib/protos.h
bacula/src/lib/queue.c
bacula/src/lib/queue.h
bacula/src/lib/rwlock.c
bacula/src/lib/rwlock.h
bacula/src/lib/serial.c
bacula/src/lib/serial.h
bacula/src/lib/signal.c
bacula/src/lib/smartall.c
bacula/src/lib/smartall.h
bacula/src/lib/util.c
bacula/src/lib/waitq.h
bacula/src/lib/workq.c
bacula/src/lib/workq.h
bacula/src/stored/append.c
bacula/src/stored/askdir.c
bacula/src/stored/authenticate.c
bacula/src/stored/bextract.c
bacula/src/stored/block.c
bacula/src/stored/block.h
bacula/src/stored/bls.c
bacula/src/stored/bscan.c
bacula/src/stored/btape.c
bacula/src/stored/dev.c
bacula/src/stored/dev.h
bacula/src/stored/device.c
bacula/src/stored/dircmd.c
bacula/src/stored/fd_cmds.c
bacula/src/stored/job.c
bacula/src/stored/label.c
bacula/src/stored/protos.h
bacula/src/stored/read.c
bacula/src/stored/record.c
bacula/src/stored/record.h
bacula/src/stored/stored.c
bacula/src/stored/stored.h
bacula/src/stored/stored_conf.c
bacula/src/stored/stored_conf.h
bacula/src/version.h

index 723f1e48ee2329d2a4916de218666fdbd0c4975d..d6495b358e702225d3fac92605473314c420c666 100755 (executable)
@@ -1,5 +1,5 @@
 # 
-# $Id$
+# Version $Id$
 # 
 @MCOMMON@
 
index ee55b709d42d51481ed9efcdf2901e5dac0b3ae3..cc8f974fa3f34773692e4a28aeabfec3c88eb39a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id$
+# Version $Id$
 #
 @MCOMMON@
 
index 9051c754254f39b9ec80e03a14474497e14f762e..d7393b19a44bd3d25b9d159c2ee0e24ba41fcfb4 100644 (file)
@@ -1,23 +1,27 @@
 /*
  * General header file configurations that apply to
  * all daemons.  System dependent stuff goes here.
+ *
+ *   Version $Id$
  */
 /*
-   Copyright (C) 2000, 2001 Kern Sibbald and John Walker
+   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License
-   as published by the Free Software Foundation; either version 2
-   of the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2 of
+   the License, or (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   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.
 
-   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.
  */
 
 
index fa0ea3fa736eed717b755688976cbab90963a7d1..5a2ae3d89ebfd2f1c25035844cfb9670e8b7b7bc 100644 (file)
@@ -1,25 +1,26 @@
 /*
  * bacula.h -- main header file to include in all Bacula source
  *
+ *   Version $Id$
  */
 
 /*
-
-   Copyright (C) 2000, 2001 Kern Sibbald and John Walker
+   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License
-   as published by the Free Software Foundation; either version 2
-   of the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2 of
+   the License, or (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
 
-   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.
+   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.
 
  */
 
index 640463f4f37f995686a312f990222681d8971fcb..56922205fbcd00e091d9b5660f13f277921f1a09 100644 (file)
 
     Also, we define types such as file address lengths.
 
+    Version $Id$
+
  */
 /*
-
-   Copyright (C) 2000, 2001 Kern Sibbald and John Walker
+   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License
-   as published by the Free Software Foundation; either version 2
-   of the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2 of
+   the License, or (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
 
-   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.
+   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.
 
  */
 
index 95ebf715fed3e410bb649a541b3cc47539468577..063f59fa7165b322884429a7e866ac8ef871bb3b 100644 (file)
@@ -7,8 +7,12 @@
  *  system.
  *   
  *    Kern Sibbald, January MMI 
+ *
+ *    Version $Id$
+ *
  */
 
+
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
index b41546304869724dff58676f4827ebecc516e5b2..8d6ecccb827f512ff85bbafd0197e7b54bac5c67 100644 (file)
@@ -9,6 +9,8 @@
  *  system.
  *   
  *    Kern Sibbald, January MMI 
+ *
+ *    Version $Id$
  */
 
 /*
index 3537ef34b15ae4921799cd77b1bde0f7c615dcbc..5ccbd071c3112cd51bcbddae8454a14de6d21a1a 100644 (file)
@@ -9,6 +9,8 @@
  *  system.
  *   
  *    Kern Sibbald, January MMI 
+ *
+ *    Version $Id$
  */
 
 /*
index 71363d33bd21398b27ad2a83b2c8032558c431f7..9e99479b16c703e8f4df3045e61dcfc98831c08a 100644 (file)
@@ -13,6 +13,8 @@
  *  system.
  *   
  *    Kern Sibbald, January MMI 
+ *
+ *    Version $Id$
  */
 
 /*
index c94c3e73e9a8d0376af1e3e12c89e03984032007..c33f6acf783fbb340d8f2dab61abb34a7e4ad784 100644 (file)
@@ -12,6 +12,8 @@
  *  system.
  *   
  *    Kern Sibbald, January MMI 
+ *
+ *    Version $Id$
  */
 
 /*
index 36d22e73b92fe1b6ec8b7b5ee510bd762aca0081..48af9c26d2a8395f40efcc7c46e17782c9511d31 100644 (file)
@@ -9,6 +9,8 @@
  *  system.
  *   
  *    Kern Sibbald, January MMI 
+ *
+ *    Version $Id$
  */
 
 /*
index d75187dcdaa102f2e630e857ad9626569c158f17..00bed656bf61d7763efb859c1f2239c5cd30764d 100755 (executable)
@@ -10,7 +10,8 @@
  *   
  *    Kern Sibbald, January MMI 
  *
- *    $Id:
+ *
+ *    Version $Id$
  */
 
 /*
index 4570d4b27a9bfe9c3ad1acb76e5aee2b2411648c..b01d416d468b1785a052215dc5ff41dd9d87898b 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * SQL header file
  *
+ *   by Kern E. Sibbald
+ *
  *   Anyone who accesses the database will need to include
  *   this file.
  *
@@ -8,6 +10,8 @@
  * the external world, and definitions destined only
  * for the external world. This is control with
  * the define __SQL_C, which is defined only in sql.c
+ *
+ *    Version $Id$
  */
 
 /*
@@ -50,57 +54,57 @@ struct sqlite {
    char dummy;
 };
 
-#define IS_NUM(x)             ((x) == 1)
-#define IS_NOT_NULL(x)        ((x) == 1)
+#define IS_NUM(x)            ((x) == 1)
+#define IS_NOT_NULL(x)       ((x) == 1)
 
 typedef struct s_sql_field {
-   char *name;                        /* name of column */
-   uint32_t length;                   /* length */
-   uint32_t max_length;               /* max length */
-   uint32_t type;                     /* type */
-   uint32_t flags;                    /* flags */
+   char *name;                       /* name of column */
+   uint32_t length;                  /* length */
+   uint32_t max_length;              /* max length */
+   uint32_t type;                    /* type */
+   uint32_t flags;                   /* flags */
 } SQL_FIELD;
 
 /*
  * This is the "real" definition that should only be
  * used inside sql.c and associated database interface
  * subroutines.
- *                    S Q L I T E
+ *                   S Q L I T E
  */
 typedef struct s_db {
-   BQUEUE bq;                         /* queue control */
+   BQUEUE bq;                        /* queue control */
    pthread_mutex_t mutex;
    struct sqlite *db;
    char **result;
-   int nrow;                          /* nrow returned from sqlite */
-   int ncolumn;                       /* ncolum returned from sqlite */
-   int num_rows;                      /* used by code */
-   int row;                           /* seek row */
-   int have_insert_id;                /* do not have insert id */
-   int fields_defined;                /* set when fields defined */
-   int field;                         /* seek field */
-   SQL_FIELD **fields;                /* defined fields */
+   int nrow;                         /* nrow returned from sqlite */
+   int ncolumn;                      /* ncolum returned from sqlite */
+   int num_rows;                     /* used by code */
+   int row;                          /* seek row */
+   int have_insert_id;               /* do not have insert id */
+   int fields_defined;               /* set when fields defined */
+   int field;                        /* seek field */
+   SQL_FIELD **fields;               /* defined fields */
    int ref_count;
    char *db_name;
    char *db_user;
    char *db_password;
    int connected;
-   char *sqlite_errmsg;               /* error message returned by sqlite */
-   char *errmsg;                      /* nicely edited error message */
-   char *cmd;                         /* SQL command string */
+   char *sqlite_errmsg;              /* error message returned by sqlite */
+   char *errmsg;                     /* nicely edited error message */
+   char *cmd;                        /* SQL command string */
 } B_DB;
 
 
 /* 
  * "Generic" names for easier conversion   
  *
- *                    S Q L I T E
+ *                   S Q L I T E
  */
 #define sql_store_result(x)   x->result
 #define sql_free_result(x)    my_sqlite_free_table(x)
 #define sql_fetch_row(x)      my_sqlite_fetch_row(x)
 #define sql_query(x, y)       my_sqlite_query(x, y)
-#define sql_close(x)          sqlite_close(x->db)  
+#define sql_close(x)         sqlite_close(x->db)  
 #define sql_strerror(x)       x->sqlite_errmsg?x->sqlite_errmsg:"unknown"
 #define sql_num_rows(x)       x->nrow
 #define sql_data_seek(x, i)   x->row = i
@@ -109,7 +113,7 @@ typedef struct s_db {
 #define sql_field_seek(x, y)  my_sqlite_field_seek(x, y)
 #define sql_fetch_field(x)    my_sqlite_fetch_field(x)
 #define sql_num_fields(x)     (unsigned)((x)->ncolumn)
-#define SQL_ROW               char**   
+#define SQL_ROW              char**   
 
 
 
@@ -131,10 +135,10 @@ extern void my_sqlite_free_table(B_DB *mdb);
  * used inside sql.c and associated database interface
  * subroutines.
  *
- *                     M Y S Q L
+ *                    M Y S Q L
  */
 typedef struct s_db {
-   BQUEUE bq;                         /* queue control */
+   BQUEUE bq;                        /* queue control */
    pthread_mutex_t mutex;
    MYSQL mysql;
    MYSQL *db;
@@ -144,10 +148,10 @@ typedef struct s_db {
    char *db_name;
    char *db_user;
    char *db_password;
-   int have_insert_id;                /* do have insert_id() */
+   int have_insert_id;               /* do have insert_id() */
    int connected;
-   char *errmsg;                      /* nicely edited error message */
-   char *cmd;                         /* SQL command string */
+   char *errmsg;                     /* nicely edited error message */
+   char *cmd;                        /* SQL command string */
 } B_DB;
 
 
@@ -156,7 +160,7 @@ typedef struct s_db {
 #define sql_free_result(x)    mysql_free_result(x->result)
 #define sql_fetch_row(x)      mysql_fetch_row(x->result)
 #define sql_query(x, y)       mysql_query(x->db, y)
-#define sql_close(x)          mysql_close(x->db)  
+#define sql_close(x)         mysql_close(x->db)  
 #define sql_strerror(x)       mysql_error(x->db)
 #define sql_num_rows(x)       mysql_num_rows(x->result)
 #define sql_data_seek(x, i)   mysql_data_seek(x->result, i)
@@ -165,8 +169,8 @@ typedef struct s_db {
 #define sql_field_seek(x, y)  mysql_field_seek(x->result, y)
 #define sql_fetch_field(x)    mysql_fetch_field(x->result)
 #define sql_num_fields(x)     mysql_num_fields(x->result)
-#define SQL_ROW               MYSQL_ROW
-#define SQL_FIELD             MYSQL_FIELD
+#define SQL_ROW              MYSQL_ROW
+#define SQL_FIELD            MYSQL_FIELD
 
 #else  /* USE BACULA DB routines */
 
@@ -175,17 +179,17 @@ typedef struct s_db {
 /* Change this each time there is some incompatible
  * file format change!!!!
  */
-#define BDB_VERSION 8                 /* file version number */
+#define BDB_VERSION 8                /* file version number */
 
 struct s_control {
-   int bdb_version;                   /* Version number */
-   uint32_t JobId;                    /* next Job Id */
-   uint32_t PoolId;                   /* next Pool Id */
-   uint32_t MediaId;                  /* next Media Id */
-   uint32_t JobMediaId;               /* next JobMedia Id */
-   uint32_t ClientId;                 /* next Client Id */
-   uint32_t FileSetId;                /* nest FileSet Id */
-   time_t time;                       /* time file written */
+   int bdb_version;                  /* Version number */
+   uint32_t JobId;                   /* next Job Id */
+   uint32_t PoolId;                  /* next Pool Id */
+   uint32_t MediaId;                 /* next Media Id */
+   uint32_t JobMediaId;              /* next JobMedia Id */
+   uint32_t ClientId;                /* next Client Id */
+   uint32_t FileSetId;               /* nest FileSet Id */
+   time_t time;                      /* time file written */
 };
 
 
@@ -193,20 +197,20 @@ struct s_control {
  *  Bacula internal DB
  */
 typedef struct s_db {
-   BQUEUE bq;                         /* queue control */
-   pthread_mutex_t mutex;             /* single thread lock */
-   int ref_count;                     /* number of times opened */
-   struct s_control control;          /* control file structure */
-   int cfd;                           /* control file device */
-   FILE *jobfd;                       /* Jobs records file descriptor */
-   FILE *poolfd;                      /* Pool records fd */
-   FILE *mediafd;                     /* Media records fd */
-   FILE *jobmediafd;                  /* JobMedia records fd */
-   FILE *clientfd;                    /* Client records fd */
-   FILE *filesetfd;                   /* FileSet records fd */
-   char *db_name;                     /* name of database */
-   char *errmsg;                      /* nicely edited error message */
-   char *cmd;                         /* Command string */
+   BQUEUE bq;                        /* queue control */
+   pthread_mutex_t mutex;            /* single thread lock */
+   int ref_count;                    /* number of times opened */
+   struct s_control control;         /* control file structure */
+   int cfd;                          /* control file device */
+   FILE *jobfd;                      /* Jobs records file descriptor */
+   FILE *poolfd;                     /* Pool records fd */
+   FILE *mediafd;                    /* Media records fd */
+   FILE *jobmediafd;                 /* JobMedia records fd */
+   FILE *clientfd;                   /* Client records fd */
+   FILE *filesetfd;                  /* FileSet records fd */
+   char *db_name;                    /* name of database */
+   char *errmsg;                     /* nicely edited error message */
+   char *cmd;                        /* Command string */
 } B_DB;
 
 #endif /* HAVE_MYSQL */
@@ -219,19 +223,19 @@ typedef struct s_db {
 #define DELETE_DB(db, cmd) DeleteDB(__FILE__, __LINE__, db, cmd)
 
 
-#else    /* not __SQL_C */
+#else   /* not __SQL_C */
 
 /* This is a "dummy" definition for use outside of sql.c
  */
-typedef struct s_db {     
-   int dummy;                         /* for SunOS compiler */
+typedef struct s_db {    
+   int dummy;                        /* for SunOS compiler */
 } B_DB;  
 
 #endif /*  __SQL_C */
 
 /* ***FIXME*** FileId_t should be uint64_t */
 typedef uint32_t FileId_t;
-typedef uint32_t DBId_t;              /* general DB id type */
+typedef uint32_t DBId_t;             /* general DB id type */
 typedef uint32_t JobId_t;
 
 
@@ -243,18 +247,18 @@ typedef uint32_t JobId_t;
 /* Job record */
 typedef struct {
    JobId_t JobId;
-   char Job[MAX_NAME_LENGTH];         /* Job unique name */
-   char Name[MAX_NAME_LENGTH];        /* Job base name */
-   int Type;                          /* actually char(1) */
-   int Level;                         /* actually char(1) */
-   int JobStatus;                     /* actually char(1) */
-   uint32_t ClientId;                 /* Id of client */
-   uint32_t PoolId;                   /* Id of pool */
-   uint32_t FileSetId;                /* Id of FileSet */
-   time_t SchedTime;                  /* Time job scheduled */
-   time_t StartTime;                  /* Job start time */
-   time_t EndTime;                    /* Job termination time */
-   btime_t JobTDate;                  /* Backup time/date in seconds */
+   char Job[MAX_NAME_LENGTH];        /* Job unique name */
+   char Name[MAX_NAME_LENGTH];       /* Job base name */
+   int Type;                         /* actually char(1) */
+   int Level;                        /* actually char(1) */
+   int JobStatus;                    /* actually char(1) */
+   uint32_t ClientId;                /* Id of client */
+   uint32_t PoolId;                  /* Id of pool */
+   uint32_t FileSetId;               /* Id of FileSet */
+   time_t SchedTime;                 /* Time job scheduled */
+   time_t StartTime;                 /* Job start time */
+   time_t EndTime;                   /* Job termination time */
+   btime_t JobTDate;                 /* Backup time/date in seconds */
    uint32_t VolSessionId;
    uint32_t VolSessionTime;
    uint32_t JobFiles;
@@ -265,8 +269,8 @@ typedef struct {
    /* Note, FirstIndex, LastIndex, Start/End File and Block
     * are only used in the JobMedia record.
     */
-   uint32_t FirstIndex;               /* First index this Volume */
-   uint32_t LastIndex;                /* Last index this Volume */
+   uint32_t FirstIndex;              /* First index this Volume */
+   uint32_t LastIndex;               /* Last index this Volume */
    uint32_t StartFile;
    uint32_t EndFile;
    uint32_t StartBlock;
@@ -284,15 +288,15 @@ typedef struct {
  */
 /* JobMedia record */
 typedef struct {
-   uint32_t JobMediaId;               /* record id */
-   JobId_t  JobId;                    /* JobId */
-   uint32_t MediaId;                  /* MediaId */
-   uint32_t FirstIndex;               /* First index this Volume */
-   uint32_t LastIndex;                /* Last index this Volume */
-   uint32_t StartFile;                /* File for start of data */
-   uint32_t EndFile;                  /* End file on Volume */
-   uint32_t StartBlock;               /* start block on tape */
-   uint32_t EndBlock;                 /* last block */
+   uint32_t JobMediaId;              /* record id */
+   JobId_t  JobId;                   /* JobId */
+   uint32_t MediaId;                 /* MediaId */
+   uint32_t FirstIndex;              /* First index this Volume */
+   uint32_t LastIndex;               /* Last index this Volume */
+   uint32_t StartFile;               /* File for start of data */
+   uint32_t EndFile;                 /* End file on Volume */
+   uint32_t StartBlock;              /* start block on tape */
+   uint32_t EndBlock;                /* last block */
 } JOBMEDIA_DBR;
 
 
@@ -301,9 +305,9 @@ typedef struct {
  *  records (e.g. pathname, filename, fileattributes).
  */
 typedef struct {
-   char *fname;                       /* full path & filename */
-   char *link;                        /* link if any */
-   char *attr;                        /* attributes statp */
+   char *fname;                      /* full path & filename */
+   char *link;                       /* link if any */
+   char *attr;                       /* attributes statp */
    uint32_t FileIndex;
    uint32_t Stream;
    JobId_t  JobId;
@@ -329,16 +333,16 @@ typedef struct {
 /* Pool record -- same format as database */
 typedef struct {
    uint32_t PoolId;
-   char Name[MAX_NAME_LENGTH];        /* Pool name */
-   uint32_t NumVols;                  /* total number of volumes */
-   uint32_t MaxVols;                  /* max allowed volumes */
-   int UseOnce;                       /* set to use once only */
-   int UseCatalog;                    /* set to use catalog */
-   int AcceptAnyVolume;               /* set to accept any volume sequence */
-   int AutoPrune;                     /* set to prune automatically */
-   int Recycle;                       /* default Vol recycle flag */
-   btime_t VolRetention;              /* retention period in seconds */
-   char PoolType[MAX_NAME_LENGTH];             
+   char Name[MAX_NAME_LENGTH];       /* Pool name */
+   uint32_t NumVols;                 /* total number of volumes */
+   uint32_t MaxVols;                 /* max allowed volumes */
+   int UseOnce;                      /* set to use once only */
+   int UseCatalog;                   /* set to use catalog */
+   int AcceptAnyVolume;              /* set to accept any volume sequence */
+   int AutoPrune;                    /* set to prune automatically */
+   int Recycle;                      /* default Vol recycle flag */
+   btime_t VolRetention;             /* retention period in seconds */
+   char PoolType[MAX_NAME_LENGTH];            
    char LabelFormat[MAX_NAME_LENGTH];
    /* Extra stuff not in DB */
    faddr_t rec_addr;
@@ -346,45 +350,45 @@ typedef struct {
 
 /* Media record -- same as the database */
 typedef struct {
-   uint32_t MediaId;                  /* Unique volume id */
+   uint32_t MediaId;                 /* Unique volume id */
    char VolumeName[MAX_NAME_LENGTH];  /* Volume name */
    char MediaType[MAX_NAME_LENGTH];   /* Media type */
-   uint32_t PoolId;                   /* Pool id */
-   time_t FirstWritten;               /* Time Volume first written */
-   time_t LastWritten;                /* Time Volume last written */
-   time_t LabelDate;                  /* Date/Time Volume labelled */
-   uint32_t VolJobs;                  /* number of jobs on this medium */
-   uint32_t VolFiles;                 /* Number of files */
-   uint32_t VolBlocks;                /* Number of blocks */
-   uint32_t VolMounts;                /* Number of times mounted */
-   uint32_t VolErrors;                /* Number of read/write errors */
-   uint32_t VolWrites;                /* Number of writes */
-   uint32_t VolReads;                 /* Number of reads */
-   uint64_t VolBytes;                 /* Number of bytes written */
-   uint64_t VolMaxBytes;              /* max bytes to write */
-   uint64_t VolCapacityBytes;         /* capacity estimate */
-   btime_t  VolRetention;             /* Volume retention in seconds */
-   int Recycle;                       /* recycle yes/no */
-   char VolStatus[20];                /* Volume status */
+   uint32_t PoolId;                  /* Pool id */
+   time_t FirstWritten;              /* Time Volume first written */
+   time_t LastWritten;               /* Time Volume last written */
+   time_t LabelDate;                 /* Date/Time Volume labelled */
+   uint32_t VolJobs;                 /* number of jobs on this medium */
+   uint32_t VolFiles;                /* Number of files */
+   uint32_t VolBlocks;               /* Number of blocks */
+   uint32_t VolMounts;               /* Number of times mounted */
+   uint32_t VolErrors;               /* Number of read/write errors */
+   uint32_t VolWrites;               /* Number of writes */
+   uint32_t VolReads;                /* Number of reads */
+   uint64_t VolBytes;                /* Number of bytes written */
+   uint64_t VolMaxBytes;             /* max bytes to write */
+   uint64_t VolCapacityBytes;        /* capacity estimate */
+   btime_t  VolRetention;            /* Volume retention in seconds */
+   int Recycle;                      /* recycle yes/no */
+   char VolStatus[20];               /* Volume status */
    /* Extra stuff not in DB */
-   faddr_t rec_addr;                  /* found record address */
+   faddr_t rec_addr;                 /* found record address */
 } MEDIA_DBR;
 
 /* Client record -- same as the database */
 typedef struct {
-   uint32_t ClientId;                 /* Unique Client id */
+   uint32_t ClientId;                /* Unique Client id */
    int AutoPrune;
    btime_t FileRetention;
    btime_t JobRetention;
-   char Name[MAX_NAME_LENGTH];        /* Client name */
-   char Uname[256];                   /* Uname for client */
+   char Name[MAX_NAME_LENGTH];       /* Client name */
+   char Uname[256];                  /* Uname for client */
 } CLIENT_DBR;
 
 /* FileSet record -- same as the database */
 typedef struct {
-   uint32_t FileSetId;                /* Unique FileSet id */
+   uint32_t FileSetId;               /* Unique FileSet id */
    char FileSet[MAX_NAME_LENGTH];     /* FileSet name */
-   char MD5[50];                      /* MD5 signature of include/exclude */
+   char MD5[50];                     /* MD5 signature of include/exclude */
 } FILESET_DBR;
 
 
index e251ae94b6cc2faf137c7b6c06b9664841397447..638978277022ebfbe6a6d7be3f2d38b4558a02ec 100644 (file)
@@ -4,6 +4,8 @@
  *    other files are generic.
  *
  *    Kern Sibbald, March 2000
+ *
+ *    Version $Id$
  */
 
 /*
index 68b931fe35df4a8f1c2fecbe4f67359c793649b0..0c3a95f63860deb9dc927bb56b08788d61552160 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ *
+ *    Version $Id$
+ */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
@@ -82,7 +86,7 @@ int  db_update_job_start_record(B_DB *db, JOB_DBR *jr);
 int  db_update_job_end_record(B_DB *db, JOB_DBR *jr);
 int  db_update_pool_record(B_DB *db, POOL_DBR *pr);
 int  db_update_media_record(B_DB *db, MEDIA_DBR *mr);
-int  db_add_MD5_to_file_record(B_DB *mdb, FileId_t FileId, char *MD5);  
+int  db_add_MD5_to_file_record(B_DB *mdb, FileId_t FileId, char *MD5); 
 int  db_mark_file_record(B_DB *mdb, FileId_t FileId, int JobId);
 
 #endif /* __SQL_PROTOS_H */
index 647d4115c5430c3abe073d09352b7b9fb2858b32..6924de8df97cb67f57f21cdeada7b6a85eaea0fe 100644 (file)
@@ -5,6 +5,8 @@
  *     (with a little more work)
  *
  *    Kern Sibbald, March 2000
+ *
+ *    Version $Id$
  */
 
 /*
index 479f97fea0e2ed14ced009ebd7467653dab15d03..7f10ba49cbc87473ab6e432cdd069ec567c00962 100644 (file)
@@ -2,6 +2,8 @@
  * Bacula Catalog Database Create record interface routines
  * 
  *    Kern Sibbald, March 2000
+ *
+ *    Version $Id$
  */
 
 /*
index a022f84901f2e8af7ab3d89f88fda7b799216b5b..aaa0776e33eded90304054d6002095b5eb09874b 100644 (file)
@@ -2,6 +2,8 @@
  * Bacula Catalog Database Delete record interface routines
  * 
  *    Kern Sibbald, December 2000
+ *
+ *    Version $Id$
  */
 
 /*
index d49efab49af48f533586e3993f09be9811d185cf..ef3d89f2b8dd646851775389cef8f4f281cd136e 100644 (file)
@@ -6,6 +6,8 @@
  *       request are in get.c
  * 
  *    Kern Sibbald, December 2000
+ *
+ *    Version $Id$
  */
 
 /*
index 5c154917f82b33514f2b8e0c420d66dd6ece00b1..0de036b7c33fc3f32ea5e07b4507569bf691187e 100644 (file)
@@ -5,6 +5,8 @@
  *       should be in find.c 
  *
  *    Kern Sibbald, March 2000
+ *
+ *    Version $Id$
  */
 
 /*
index 2fdef3f191ba5389a41b34a3f2512253184880e5..c2197b69bf0a53ee817e82e15bb077b9b53bd4fe 100644 (file)
@@ -2,6 +2,8 @@
  * Bacula Catalog Database List records interface routines
  * 
  *    Kern Sibbald, March 2000
+ *
+ *    Version $Id$
  */
 
 /*
index af77ff3408bb60faff81ea54f41b73784623f136..d84eeab77cf8b217999bf371b60a523dcab28e50 100644 (file)
@@ -2,6 +2,8 @@
  * Bacula Catalog Database Update record interface routines
  * 
  *    Kern Sibbald, March 2000
+ *
+ *    Version $Id$
  */
 
 /*
index bbe0d09f1050ddf42dc77fefde77d687fe8da400..e687da4b788528ebf012fc89cde84d32f034dacb 100644 (file)
@@ -2,6 +2,8 @@
  * Bacula Catalog Database routines specific to SQLite
  *
  *    Kern Sibbald, January 2002
+ *
+ *    Version $Id$
  */
 
 /*
index 2cafd53e6ab629bb5d2a459edc444d57c005b6e0..5f0f1438bcfc9c0c6ef0f5b775659897a5a49da7 100644 (file)
@@ -1,3 +1,6 @@
+#
+#  Version $Id$
+#
 @MCOMMON@
 
 srcdir =       .
index bbe0e3fd8c134102faac4c83c7110313c5333cec..f20c683fc9a313240e0edc83129be1c88d7c11cc 100644 (file)
@@ -3,6 +3,8 @@
  *   Bacula Console interface to the Director
  *
  *     Kern Sibbald, September MM
+ *
+ *     Version $Id$
  */
 
 /*
index 89b345b8062d953ebf02e52a439da8fe3bd74ec0..b12153138c2f478e5f3d0a1ca11746501fe985b3 100644 (file)
@@ -2,44 +2,46 @@
  * Bacula User Agent specific configuration and defines
  *
  *     Kern Sibbald, Sep MM
+ *
+ *     Version $Id$
  */
 
 /*
  * Resource codes -- they must be sequential for indexing   
  */
-#define R_FIRST                      1001
+#define R_FIRST                       1001
 
-#define R_CONSOLE                    1001
-#define R_DIRECTOR                   1002
+#define R_CONSOLE                     1001
+#define R_DIRECTOR                    1002
 
-#define R_LAST                       R_DIRECTOR
+#define R_LAST                        R_DIRECTOR
 
 /*
  * Some resource attributes
  */
-#define R_NAME                       1020
-#define R_ADDRESS                    1021
-#define R_PASSWORD                   1022
-#define R_TYPE                       1023
-#define R_BACKUP                     1024
+#define R_NAME                        1020
+#define R_ADDRESS                     1021
+#define R_PASSWORD                    1022
+#define R_TYPE                        1023
+#define R_BACKUP                      1024
 
 
 /* Definition of the contents of each Resource */
 
 /* Console "globals" */
 struct s_res_cons {
-   RES  hdr;
-   char *rc_file;                    /* startup file */
-   char *hist_file;                  /* command history file */
+   RES   hdr;
+   char *rc_file;                     /* startup file */
+   char *hist_file;                   /* command history file */
 };
 typedef struct s_res_cons CONSRES;
 
 /* Director */
 struct s_res_dir {
-   RES  hdr;
-   int  DIRport;                     /* UA server port */
-   char *address;                    /* UA server address */
-   char *password;                   /* UA server password */
+   RES   hdr;
+   int   DIRport;                     /* UA server port */
+   char *address;                     /* UA server address */
+   char *password;                    /* UA server password */
 };
 typedef struct s_res_dir DIRRES;
 
@@ -48,8 +50,8 @@ typedef struct s_res_dir DIRRES;
  * resource structure definitions.
  */
 union u_res {
-   struct s_res_dir    res_dir;
-   struct s_res_cons   res_cons;
+   struct s_res_dir     res_dir;
+   struct s_res_cons    res_cons;
    RES hdr;
 };
 
index a7aeaf24b37a064d1415d876475f033027e6089f..fd0c0d1c04541eb0950c9d7a220aedf651a3c814 100644 (file)
@@ -1,5 +1,7 @@
 #
 #  Bacula Director Makefile
+#
+#  Version $Id$
 #  
 @MCOMMON@
 
@@ -20,7 +22,8 @@ first_rule: all
 dummy:
 
 #
-SVRSRCS = dird.c authenticate.c backup.c \
+SVRSRCS = dird.c authenticate.c autoprune.c \
+         backup.c \
          catreq.c dird_conf.c \
          fd_cmds.c getmsg.c job.c \
          mountreq.c msgchan.c newvol.c \
@@ -32,7 +35,8 @@ SVRSRCS = dird.c authenticate.c backup.c \
          ua_purge.c ua_run.c \
          ua_select.c ua_server.c \
          ua_status.c verify.c
-SVROBJS = dird.o authenticate.o backup.o \
+SVROBJS = dird.o authenticate.o autoprune.o \
+         backup.o \
          catreq.o dird_conf.o \
          fd_cmds.o getmsg.o job.o \
          mountreq.o msgchan.o newvol.o \
index f6ffa208f5eca332f165907086a23bb4766d22da..16c3da759ad23577b3dad1e4dd8df34b670ade54 100644 (file)
@@ -7,7 +7,7 @@
  *
  *    This routine runs as a thread and must be thread reentrant.
  *
- *  Basic tasks done here:
+ *   Version $Id$
  *
  */
 /*
index 631a971c5db00808c9263870dd3e2324a0781366..386f82669847d1e5db88650a3d90ddf5abb7cda0 100644 (file)
@@ -14,6 +14,7 @@
  *      to do the backup.
  *     When the File daemon finishes the job, update the DB.
  *
+ *   Version $Id$
  */
 
 /*
@@ -397,7 +398,7 @@ Volume names(s):        %s\n\
 Volume Session Id:      %d\n\
 Volume Session Time:    %d\n\
 Volume Bytes:           %s\n\
-Termination:            %s\n"),
+Termination:            %s\n\n"),
        edt,
        jcr->jr.JobId,
        jcr->jr.Job,
index d13d23c446f31fa23cfe0846cc9ba4dbdd237186..de26079d7f1dfd8c400c68ec11f83a9c1cd68bcb 100644 (file)
@@ -10,6 +10,7 @@
  *  Basic tasks done here:
  *     Handle Catalog services.
  *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index cc93770be07d7fa4714ae402ff7d0a5abea5ae0e..e96b49a923d46146802edc9b04e811cdde6c6383 100644 (file)
@@ -3,6 +3,8 @@
  *   Bacula Director daemon -- this is the main program
  *
  *     Kern Sibbald, March MM
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 28d8caeb87673050e5cbc3a7347a8e1b89fa3c6f..efe5c4f92fc85a63e8dcc5a6227412d6c34cd5b2 100644 (file)
@@ -2,6 +2,8 @@
  * Includes specific to the Director
  *
  *     Kern Sibbald, December MM
+ *
+ *    Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 9043edcab06208dfe28ec962d727fcca40cf863e..4073fb268042579764797a33ca593b69016a79f4 100644 (file)
@@ -19,7 +19,7 @@
  *
  *     Kern Sibbald, January MM
  *
- *     $Id$
+ *     Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 07ca5c20c8a0df1ec7d7d2a7eca5af13695cd618..eebc692dfd47cd089bcffe2bb70f289ad4dbd47d 100644 (file)
@@ -2,6 +2,8 @@
  * Director specific configuration and defines
  *
  *     Kern Sibbald, Feb MM
+ *
+ *    Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -248,8 +250,11 @@ typedef union u_res URES;
 /* Run structure contained in Schedule Resource */
 struct s_run {
    struct s_run *next;                /* points to next run record */
-   int level;
+   int level;                         /* level override */
    int job_type;  
+   POOL *pool;                        /* Pool override */
+   STORE *storage;                    /* Storage override */
+   MSGS *msgs;                        /* Messages override */
    char *since;
    int level_no;
    int minute;                        /* minute to run job */
index f358f4e409ce2b18ae734298144663fd219bdf4c..c61cbb800ef2dfdbba924000300ba55b94c13805 100644 (file)
@@ -10,6 +10,7 @@
  *  Utility functions for sending info to File Daemon.
  *   These functions are used by both backup and verify.
  *   
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index b37abe299977a7e2f54fde66c21b685b4f493d06..ca6273cc02aa0697aaf84ebb54712e067627e5e4 100644 (file)
@@ -18,6 +18,7 @@
  *      Requests are any message that does not begin with a digit.
  *      In affect, they are commands.
  *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index ea2dbd22d9cae99b6eecba02ad50081fbbdc9d66..9813b16525af118cceb12966eac8e3eda2cc7dcd 100644 (file)
@@ -3,6 +3,8 @@
  *   Bacula Director Job processing routines
  *
  *     Kern Sibbald, October MM
+ *
+ *    Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -152,15 +154,19 @@ static void job_thread(void *arg)
       switch (jcr->JobType) {
         case JT_BACKUP:
            do_backup(jcr);
+           do_autoprune(jcr);
            break;
         case JT_VERIFY:
            do_verify(jcr);
+           do_autoprune(jcr);
            break;
         case JT_RESTORE:
            do_restore(jcr);
+           do_autoprune(jcr);
            break;
         case JT_ADMIN:
            /* No actual job */
+           do_autoprune(jcr);
            break;
         default:
             Dmsg1(0, "Unimplemented job type: %d\n", jcr->JobType);
@@ -304,7 +310,8 @@ void dird_free_jcr(JCR *jcr)
  * Set some defaults in the JCR necessary to
  * run. These items are pulled from the job
  * definition as defaults, but can be overridden
- * later.
+ * later either by the Run record in the Schedule resource,
+ * or by the Console program.
  */
 void set_jcr_defaults(JCR *jcr, JOB *job)
 {
index 68dc820090dba52b5142c77ae78fc8ec9e5eb834..831b02d4fd00c599e4de313b45a4a88c5f213dde 100644 (file)
@@ -10,6 +10,7 @@
  *  Basic tasks done here:
  *     Handle Mount services.
  *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index b59fcb1ccf1aff2a341de081065b143549dc1ab1..e832e95dde56e59a9760a44c2952cb648937ea33 100644 (file)
@@ -13,6 +13,7 @@
  *    Create a thread to interact with the Storage daemon
  *     who returns a job status and requests Catalog services, etc.
  *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index bf698a382b60abf1944310daaa3b61f9e08142e0..92c2b1f691bbaa1cf313ab8633dce77632e1e28d 100644 (file)
@@ -8,8 +8,9 @@
  *    This routine runs as a thread and must be thread reentrant.
  *
  *  Basic tasks done here:
- *      If possible create a new Media entry
+ *     If possible create a new Media entry
  *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -52,22 +53,22 @@ int newVolume(JCR *jcr)
    if (db_get_pool_record(jcr->db, &pr) && pr.LabelFormat[0] &&
        pr.LabelFormat[0] != '*') {
       if (pr.MaxVols == 0 || pr.NumVols < pr.MaxVols) {
-         memset(&mr, 0, sizeof(mr));
-         mr.PoolId = jcr->PoolId;
-         strcpy(mr.MediaType, jcr->store->media_type);
-         strcpy(name, pr.LabelFormat);   
+        memset(&mr, 0, sizeof(mr));
+        mr.PoolId = jcr->PoolId;
+        strcpy(mr.MediaType, jcr->store->media_type);
+        strcpy(name, pr.LabelFormat);   
          strcat(name, "%04d");
-         sprintf(mr.VolumeName, name, ++pr.NumVols);
+        sprintf(mr.VolumeName, name, ++pr.NumVols);
          strcpy(mr.VolStatus, "Append");
-         mr.Recycle = pr.Recycle;
-         mr.VolRetention = pr.VolRetention;
-         if (db_create_media_record(jcr->db, &mr) &&
-            db_update_pool_record(jcr->db, &pr) == 1) {
+        mr.Recycle = pr.Recycle;
+        mr.VolRetention = pr.VolRetention;
+        if (db_create_media_record(jcr->db, &mr) &&
+           db_update_pool_record(jcr->db, &pr) == 1) {
             Dmsg1(90, "Created new Volume=%s\n", mr.VolumeName);
-            return 1;
-         } else {
+           return 1;
+        } else {
             Jmsg(jcr, M_ERROR, 0, "%s", db_strerror(jcr->db));
-         }
+        }
       }
    }
    return 0;   
index 7f09c081a6eddc6bb56e05db1df3c5acf0a7f871..8496d1caacfd03b2bdc12a9f0bdbf6a0d79d0730 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Director external function prototypes
  *
- *   $Id:
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -28,6 +28,10 @@ extern int authenticate_storage_daemon(JCR *jcr);
 extern int authenticate_file_daemon(JCR *jcr);
 extern int authenticate_user_agent(BSOCK *ua);
 
+/* autoprune.c */
+extern int do_autoprune(JCR *jcr);
+
+
 /* catreq.c */
 extern void catalog_request(JCR *jcr, BSOCK *bs, char *buf);
 extern void catalog_update(JCR *jcr, BSOCK *bs, char *buf);
index a63c47eb1fbf5dc2964b4b6fbeeb19b6bccc11da..f92efb0e2da0f0155c33f046ef7ecaa25ce6d4f9 100644 (file)
@@ -17,6 +17,7 @@
  *      to do the restore.
  *     Update the DB according to what files where restored????
  *
+ *   Version $Id$
  */
 
 /*
@@ -248,7 +249,7 @@ static void restore_cleanup(JCR *jcr, int status)
    update_job_end_record(jcr);
 
    bstrftime(dt, sizeof(dt), jcr->jr.EndTime);
-   Jmsg(jcr, M_INFO, 0, _("%s End Restore Job %s.\n"),
+   Jmsg(jcr, M_INFO, 0, _("%s End Restore Job %s.\n\n"),
       dt, jcr->Job);
 
    Dmsg0(20, "Leaving restore_cleanup\n");
index 3fe299354a5768e0f23c0b1f36b6d132142cdc5c..e173356a549e2c1033de4e636dd788fb0151847e 100644 (file)
@@ -4,6 +4,8 @@
  *   directives, which are part of the Schedule Resource
  *
  *     Kern Sibbald, May MM
+ *
+ *     Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -141,6 +143,14 @@ static int is_num(char *num)
    return TRUE;
 }
 
+/* Keywords (RHS) permitted in Run records */
+static struct s_kw RunFields[] = {
+   {"pool",     'P'},
+   {"level",    'L'},
+   {"storage",  'S'},
+   {"messages", 'M'},
+   {NULL,       0}
+};
 
 /* 
  * Store Schedule Run information   
@@ -157,11 +167,13 @@ static int is_num(char *num)
  */
 void store_run(LEX *lc, struct res_items *item, int index, int pass)
 {
-   int token, state, state2, i, code, code2;
+   int i, j, found;
+   int token, state, state2, code, code2;
    int options = lc->options;
    RUN **run = (RUN **)(item->value);  
    RUN *trun;
    char *p;
+   RES *res;
 
 
    lc->options |= LOPT_NO_IDENT;      /* want only "strings" */
@@ -170,28 +182,74 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
    memset(&lrun, 0, sizeof(RUN));
 
    /* scan for Job level "full", "incremental", ... */
-   token = lex_get_token(lc);
-   if (token != T_STRING) {
-      scan_err1(lc, _("Expected a Job level identifier, got: %s"), lc->str);
-   } else {
-      if (strcasecmp(lc->str, "level")) {
-        if (lex_get_token(lc) != T_EQUALS) {
-            scan_err1(lc, "Expected an equals, got: %s", lc->str);
-        }
-        token = lex_get_token(lc);
-      }
-      for (i=0; joblevels[i].level_name; i++) {
-        if (strcasecmp(lc->str, joblevels[i].level_name) == 0) {
-           lrun.level = joblevels[i].level;
-           lrun.job_type = joblevels[i].job_type;
-           i = 0;
-           break;
-        }
-      }
-      if (i != 0) {
-         scan_err1(lc, _("Job level field: %s not found in run record"), lc->str);
+   for (found=TRUE; found; ) {
+      found = FALSE;
+      token = lex_get_token(lc);
+      if (token != T_IDENTIFIER && token != T_STRING && token != T_QUOTED_STRING) {
+         scan_err1(lc, "Expected a keyword name, got: %s", lc->str);
       }
-   }
+      for (i=0; RunFields[i].name; i++) {
+        if (strcasecmp(lc->str, RunFields[i].name) == 0) {
+           found = TRUE;
+           if (lex_get_token(lc) != T_EQUALS) {
+               scan_err1(lc, "Expected an equals, got: %s", lc->str);
+           }
+           token = lex_get_token(lc);
+           if (token != T_IDENTIFIER && token != T_STRING && token != T_QUOTED_STRING) {
+               scan_err1(lc, "Expected a keyword name, got: %s", lc->str);
+           }
+           switch (RunFields[i].token) {
+            case 'L':                 /* level */
+              for (j=0; joblevels[j].level_name; j++) {
+                 if (strcasecmp(lc->str, joblevels[j].level_name) == 0) {
+                    lrun.level = joblevels[j].level;
+                    lrun.job_type = joblevels[j].job_type;
+                    j = 0;
+                    break;
+                 }
+              }
+              if (j != 0) {
+                  scan_err1(lc, _("Job level field: %s not found in run record"), lc->str);
+              }
+              break;
+            case 'P':                 /* Pool */
+              if (pass == 2) {
+                 res = GetResWithName(R_POOL, lc->str);
+                 if (res == NULL) {
+                     scan_err1(lc, "Could not find specified Pool Resource: %s",
+                               lc->str);
+                 }
+                 lrun.pool = (POOL *)res;
+              }
+              break;
+            case 'S':                 /* storage */
+              if (pass == 2) {
+                 res = GetResWithName(R_STORAGE, lc->str);
+                 if (res == NULL) {
+                     scan_err1(lc, "Could not find specified Storage Resource: %s",
+                               lc->str);
+                 }
+                 lrun.storage = (STORE *)res;
+              }
+              break;
+            case 'M':                 /* messages */
+              if (pass == 2) {
+                 res = GetResWithName(R_MSGS, lc->str);
+                 if (res == NULL) {
+                     scan_err1(lc, "Could not find specified Messages Resource: %s",
+                               lc->str);
+                 }
+                 lrun.msgs = (MSGS *)res;
+              }
+              break;
+           default:
+               scan_err1(lc, "Expected a keyword name, got: %s", lc->str);
+              break;
+           } /* end switch */     
+        } /* end if strcasecmp */
+      } /* end for RunFields */
+   } /* end for found */
+
 
    /*
     * Scan schedule times.
@@ -220,9 +278,8 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
               break;
            }
            /* everything else must be a keyword */
-           lcase(lc->str);
            for (i=0; keyw[i].name; i++) {
-              if (strcmp(lc->str, keyw[i].name) == 0) {
+              if (strcasecmp(lc->str, keyw[i].name) == 0) {
                  state = keyw[i].state;
                  code   = keyw[i].code;
                  i = 0;
index e65f12b40d2eee6bbb5ef5db7a2fc62ca29ab541..cda74b0e821a302cabd9cee727623d18c6ee2aa0 100644 (file)
@@ -6,6 +6,8 @@
  *     fire them up.
  *
  *     Kern Sibbald, May MM
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -126,9 +128,21 @@ JCR *wait_for_next_job(char *job_to_run)
    runjobs[jobindex].runtime = 0;     /* remove from list */
    run->last_run = now;              /* mark as run */
    rem_runjobs--;                    /* decrement count of remaining jobs */
+
    jcr = new_jcr(sizeof(JCR), dird_free_jcr);
    set_jcr_defaults(jcr, job);
-   jcr->level = run->level;          /* override run level */
+   if (run->level) {
+      jcr->level = run->level;       /* override run level */
+   }
+   if (run->pool) {
+      jcr->pool = run->pool;         /* override pool */
+   }
+   if (run->storage) {
+      jcr->store = run->storage;      /* override storage */
+   }
+   if (run->msgs) {
+      jcr->msgs = run->msgs;         /* override messages */
+   }
    Dmsg0(200, "Leave wait_for_next_job()\n");
    return jcr;
 }
index 2336a4b2b23744764b208c97fd73735966966ac0..13c092dbf9cb6e009044b5969aa5bd5a8a515876 100644 (file)
@@ -3,7 +3,7 @@
  *
  *     Kern Sibbald, August MMI
  *
- *     $Id:
+ *     Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -25,7 +25,7 @@
 
  */
 
-#define MAX_ARGS 20
+#define MAX_ARGS 30
 
 typedef struct s_ua_context {
    BSOCK *UA_sock;
@@ -33,19 +33,19 @@ typedef struct s_ua_context {
    JCR *jcr;
    B_DB *db;
    CAT *catalog;
-   char *cmd;                        /* return command/name buffer */
-   char *args;                       /* command line arguments */
-   char *argk[MAX_ARGS];             /* argument keywords */
-   char *argv[MAX_ARGS];             /* argument values */
-   int argc;                         /* number of arguments */
-   char **prompt;                    /* list of prompts */
-   int max_prompts;                  /* max size of list */
-   int num_prompts;                  /* current number in list */
-   int auto_display_messages;        /* if set, display messages */
+   POOLMEM *cmd;                      /* return command/name buffer */
+   POOLMEM *args;                     /* command line arguments */
+   char *argk[MAX_ARGS];              /* argument keywords */
+   char *argv[MAX_ARGS];              /* argument values */
+   int argc;                          /* number of arguments */
+   char **prompt;                     /* list of prompts */
+   int max_prompts;                   /* max size of list */
+   int num_prompts;                   /* current number in list */
+   int auto_display_messages;         /* if set, display messages */
    int user_notified_msg_pending;     /* set when user notified */
-   int automount;                    /* if set, mount after label */
-   int quit;                         /* if set, quit */
-   int verbose;                      /* set for normal UA verbosity */
+   int automount;                     /* if set, mount after label */
+   int quit;                          /* if set, quit */
+   int verbose;                       /* set for normal UA verbosity */
 } UAContext;
 
 /* ua_cmds.c */
@@ -77,7 +77,7 @@ int select_pool_and_media_dbr(UAContext *ua, POOL_DBR *pr, MEDIA_DBR *mr);
 void   start_prompt(UAContext *ua, char *msg);
 void   add_prompt(UAContext *ua, char *prompt);
 int    do_prompt(UAContext *ua, char *msg, char *prompt);
-CAT   *get_catalog_resource(UAContext *ua);          
+CAT   *get_catalog_resource(UAContext *ua);           
 STORE *get_storage_resource(UAContext *ua, char *cmd);
 int    get_media_type(UAContext *ua, char *MediaType);
 int    get_pool_dbr(UAContext *ua, POOL_DBR *pr);
@@ -88,3 +88,8 @@ int get_job_dbr(UAContext *ua, JOB_DBR *jr);
 int find_arg_keyword(UAContext *ua, char **list);
 int do_keyword_prompt(UAContext *ua, char *msg, char **list);
 int confirm_retention(UAContext *ua, btime_t *ret, char *msg);
+
+/* ua_prune.c */
+int prune_files(UAContext *ua, CLIENT *client);
+int prune_jobs(UAContext *ua, CLIENT *client);
+int prune_volume(UAContext *ua, POOL_DBR *pr, MEDIA_DBR *mr);
index 06a08498a2ec8706ab36ad710bb550bfabc86b59..3f1ee1c59f0d9236e26131ba634fdb0485aa2c55 100644 (file)
@@ -3,6 +3,8 @@
  *   Bacula Director -- User Agent Commands
  *
  *     Kern Sibbald, September MM
+ *
+ *   Version $Id$
  */
 
 /*
@@ -381,12 +383,7 @@ static int cancelcmd(UAContext *ua, char *cmd)
       free_jcr(jcr);
       return 1;
         
-   case JS_Running:
-   case JS_WaitSD:
-   case JS_WaitFD:
-   case JS_WaitMedia:
-   case JS_WaitMount:
-   case JS_Blocked:
+   default:
 
       jcr->JobStatus = JS_Cancelled;
       /* Cancel File daemon */
@@ -423,9 +420,6 @@ static int cancelcmd(UAContext *ua, char *cmd)
       bnet_close(sd);
       ua->jcr->store_bsock = NULL;
 
-   default:
-      bsendmsg(ua, _("JobId %d Job %s Status=%c cannot be cancelled.\n"), 
-         jcr->JobId, jcr->Job, jcr->JobStatus);
    }
    free_jcr(jcr);
 
index a466e3e18587c80ace44f419abc6ae57666c6eeb..3ecd6eb39e30f475316a31f8facfb28bcf923e9f 100644 (file)
@@ -7,6 +7,8 @@
  *       returned results are (supposed to be) predictable.
  *
  *     Kern Sibbald, April MMII
+ *
+ *   Version $Id$
  */
 
 /*
index 9a24d052b1b2404be6593a716e2eefdda5ecf630..85d7feefdd49fa0608da896b2820202441de017a 100644 (file)
@@ -3,6 +3,8 @@
  *   Bacula Director -- User Agent Input and scanning code
  *
  *     Kern Sibbald, October MMI
+ *
+ *   Version $Id$
  */
 
 /*
index ff572affa4bf412ae64a52890f23641a1b24d4dd..2df7c9d7026b3ec8b60d814f7470e8388ba4d5cf 100644 (file)
@@ -4,6 +4,8 @@
  *     I.e. messages, listing database, showing resources, ...
  *
  *     Kern Sibbald, September MM
+ *
+ *   Version $Id$
  */
 
 /*
index 2111d09e99561053f735dfba8ac85db600c971a6..c6e32556b5e2628b2328a8ae46d6dcd93c3b98e4 100644 (file)
@@ -5,7 +5,7 @@
  *
  *     Kern Sibbald, February MMII
  *
- *     $Id$
+ *   Version $Id$
  */
 
 /*
index b2c4a502151f05ea1f0937872653a6e95c068a31..f544a79081de3207647b184dcd470c015414eeab 100644 (file)
@@ -8,7 +8,7 @@
  *
  *     Kern Sibbald, February MMII
  *
- *     $Id$
+ *   Version $Id$
  */
 
 /*
index a44d73ea0395070bc3bb21d5306d4395698a5589..ad4e8c2326858f5553eec49daa4e567e339f8a3a 100644 (file)
@@ -3,6 +3,8 @@
  *   Bacula Director -- Run Command
  *
  *     Kern Sibbald, December MMI
+ *
+ *   Version $Id$
  */
 
 /*
index 5992c63f4957283b699943b58e9d8fcfd4cb3d26..0a2fddddca4ac8b779abd0ea47c3ffa8c1f5d2aa 100644 (file)
@@ -4,7 +4,7 @@
  *
  *     Kern Sibbald, October MMI
  *
- *     $Id$
+ *   Version  $Id$
  */
 
 /*
index 8722a028d718550b5cc3ff447b649a49fbf444ab..86dbc0f36d17b29a52e51e58bb561171c90e0a08 100644 (file)
@@ -3,6 +3,8 @@
  *   Bacula Director -- User Agent Server
  *
  *     Kern Sibbald, September MM
+ *
+ *    Version $Id$
  */
 
 /*
@@ -99,12 +101,12 @@ static void handle_UA_client_request(void *arg)
 
    memset(&ua, 0, sizeof(ua));
    ua.automount = TRUE;
-   ua.verbose = TRUE;
+   ua.verbose = 1;
    ua.jcr = new_jcr(sizeof(JCR), dird_free_jcr);
    ua.jcr->sd_auth_key = bstrdup("dummy"); /* dummy Storage daemon key */
    ua.UA_sock = UA_sock;
-   ua.cmd = (char *) get_pool_memory(PM_FNAME);
-   ua.args = (char *) get_pool_memory(PM_FNAME);
+   ua.cmd = get_pool_memory(PM_FNAME);
+   ua.args = get_pool_memory(PM_FNAME);
 
    create_unique_job_name(ua.jcr, "*Console*");
    ua.jcr->sched_time = ua.jcr->start_time;
index eb8b651f71acd031e60451d0f7b8a44991b24ae6..6d287c9d042cdd794b4894dfd308d0ff15971f17 100644 (file)
@@ -3,6 +3,8 @@
  *   Bacula Director -- User Agent Status Command
  *
  *     Kern Sibbald, August MMI
+ *
+ *   Version $Id$
  */
 
 /*
index ea1b9583f874715648b8e1ec95ed7c7a2195a87f..2134be18d2e5e92cd68f3637f75832c8b37cada8 100644 (file)
@@ -17,6 +17,7 @@
  *     When the File daemon sends the attributes, compare them to
  *      what is in the DB.
  *
+ *   Version $Id$
  */
 
 /*
@@ -264,7 +265,7 @@ Client:                 %s\n\
 Start time:             %s\n\
 End time:               %s\n\
 Files Examined:         %s\n\
-Termination:            %s\n"),
+Termination:            %s\n\n"),
        edt,
        jcr->jr.JobId,
        jcr->jr.Job,
index cecf3e52ca587198c6a77634637456100ae77d36..1a2b6b4d7242ffb85ac8a722bc3afdb89d2aa6ef 100644 (file)
@@ -2,6 +2,8 @@
  * Authenticate Director who is attempting to connect.
  *
  *   Kern Sibbald, October 2000
+ *
+ *   Version $Id$
  * 
  */
 /*
index 9bbcff6b413a4b1e3963fe9f25c88e35ae1e763f..58b1cb427b238aeae2759f2421af3e73f5830200 100644 (file)
@@ -4,6 +4,8 @@
  *
  *    Kern Sibbald, March MM
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index fa020ff76b2518a809c55536c0a6af93de4c3084..c5821b69c2ccba6d2561ff0770297bb2c11196e8 100644 (file)
@@ -4,6 +4,8 @@
  *
  *    Kern Sibbald, September MMI
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 83dc02ed44dbae5ed8e698e2a6ec18af588e34e6..4124f8c4be01c169c1753b9781593fa59aa96ac7 100644 (file)
@@ -3,6 +3,8 @@
  *
  *    Kern Sibbald, March MM
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index e376722b4e8cd99f19af866fc1a0c4ba3daa4ac5..4cce69b2ac62ffede30a4319784037dfec6fdaa9 100644 (file)
@@ -2,6 +2,8 @@
  * Bacula File Daemon specific configuration and defines
  *
  *     Kern Sibbald, Jan MMI 
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -30,9 +32,9 @@
 #include "protos.h"                   /* file daemon prototypes */
 #include "filed_conf.h"
 #ifdef HAVE_LIBZ
-#include <zlib.h>                     /* compression headers */
+#include <zlib.h>                    /* compression headers */
 #else
 #define uLongf uint32_t
 #endif
 
-extern int win32_client;              /* Are we running on Windows? */
+extern int win32_client;             /* Are we running on Windows? */
index 21a756765e1f90aad350e0d3ed19f614fd5c1632..c2ef765ef6838cbf5242d9d5c827bd069a6c4740 100644 (file)
@@ -18,6 +18,8 @@
  *     for the resource records.
  *
  *     Kern Sibbald, September MM
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index c2547a99eb6062f02829c54b9d1687586ddb5fef..56a3ef98273b7e2ad6086af840edc1319e92af36 100644 (file)
@@ -2,6 +2,8 @@
  * Bacula File Daemon specific configuration
  *
  *     Kern Sibbald, Sep MM
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 /*
  * Resource codes -- they must be sequential for indexing   
  */
-#define R_FIRST                       1001
+#define R_FIRST                      1001
 
-#define R_DIRECTOR                    1001
-#define R_CLIENT                      1002
-#define R_MSGS                        1003
+#define R_DIRECTOR                   1001
+#define R_CLIENT                     1002
+#define R_MSGS                       1003
 
-#define R_LAST                        R_MSGS
+#define R_LAST                       R_MSGS
 
 /*
  * Some resource attributes
  */
-#define R_NAME                        1020
-#define R_ADDRESS                     1021
-#define R_PASSWORD                    1022
-#define R_TYPE                        1023
+#define R_NAME                       1020
+#define R_ADDRESS                    1021
+#define R_PASSWORD                   1022
+#define R_TYPE                       1023
 
 
 /* Definition of the contents of each Resource */
 struct s_res_dir {
-   RES   hdr;
-   char *password;                    /* Director password */
-   char *address;                     /* Director address or zero */
+   RES  hdr;
+   char *password;                   /* Director password */
+   char *address;                    /* Director address or zero */
 };
 typedef struct s_res_dir DIRRES;
 
 struct s_res_client {
-   RES   hdr;
-   int   FDport;                      /* where we listen for Directors */ 
+   RES  hdr;
+   int  FDport;                      /* where we listen for Directors */ 
    char *working_directory;
    char *pid_directory;
    char *subsys_directory;
@@ -67,9 +69,9 @@ typedef struct s_res_client CLIENT;
  * resource structure definitions.
  */
 union u_res {
-   struct s_res_dir     res_dir;
-   struct s_res_client  res_client;
-   struct s_res_msgs    res_msgs;
+   struct s_res_dir    res_dir;
+   struct s_res_client res_client;
+   struct s_res_msgs   res_msgs;
    RES hdr;
 };
 
index 419f9e99a91f95d69e17347b11d9332f00a146ef..5ec027e62ca4bcb2c32600b0caa2954a51d7c566 100644 (file)
@@ -3,6 +3,8 @@
  *
  *    Kern Sibbald, October MM
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index af93c8ab70b7b3fcd3359a07fe3a249481341c9f..286eb2644d3c76d6b7b03f4edf18d360024b4634 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ *   Version $Id$
+ */
+
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
@@ -24,4 +28,3 @@ extern void do_restore(JCR *jcr, char *addr, int port);
 extern int authenticate_director(JCR *jcr);
 extern int authenticate_storagedaemon(JCR *jcr);
 extern int make_estimate(JCR *jcr);
-
index 7e3da87f8c5f5c3bcfcaab5b8965f386bd8b78e0..2d57ef5bcc725f8313463dce92054cec0d14acce 100644 (file)
@@ -3,6 +3,8 @@
  *
  *    Kern Sibbald, November MM
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 832f7511f9c05a3a386ff3a952e5bc33c67306d1..91e6e92876f590376efb40f1f6c15df7974256b4 100755 (executable)
@@ -3,6 +3,8 @@
  *
  *    Kern Sibbald, August MMI
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index a083c0b1e0394e312376be95368ba1f3cf627d79..a3af127d77f5b9621dc4508591d9c173950b8cc3 100644 (file)
@@ -3,6 +3,8 @@
  *
  *    Kern Sibbald, October MM
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 48b0eae69949de41a05ce496e36d77cab85f3638..78fdf569383ddaf7f23a96b46b62b6075a22a8aa 100644 (file)
@@ -6,24 +6,27 @@
  *
  * Kern Sibbald, Nov MM
  *
+ *   Version $Id$
  */
 
 /*
-   Copyright (C) 2000, 2001 Kern Sibbald and John Walker
+   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License
-   as published by the Free Software Foundation; either version 2
-   of the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2 of
+   the License, or (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   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.
 
-   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.
  */
  
 #ifndef __JCR_H_
index f65c94236e4c2ffc0b8b7e933bd1f704090d4c3a..f25ee348bca0d6338a60d708d42542814c6a16f3 100644 (file)
@@ -2,6 +2,7 @@
 
        Error checking memory allocator
 
+     Version $Id$
 */
 
 /*
index af470181fdb48ec1858ae26cb1be073bd3cf2f8e..6a9f8a8382106bb2f3af5e918b5d56f6dbb6a488 100644 (file)
@@ -2,6 +2,8 @@
  *   Generic base 64 input and output routines
  *
  *    Written by Kern E. Sibbald, March MM.
+ *
+ *   Version $Id$
  */
 
 /*
index ef88741808a6412c546166362e6c12cafc123bf9..b2ad6bc774767cf55ca17cde472d68d0bf866cd8 100644 (file)
@@ -3,6 +3,8 @@
  *   Kern Sibbald, MM
  *
  *  NOTE:  base 0
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index def42e8578336c18a0d1cf23f8871a276f0abe1f..4991646a3ca2e24ba9850282c5462991a15063ea 100644 (file)
@@ -6,6 +6,7 @@
  * Adapted and enhanced for Bacula, originally written 
  * for inclusion in the Apcupsd package
  *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -456,7 +457,7 @@ again:
    bs->msglen = bvsnprintf(bs->msg, maxlen, fmt, arg_ptr);
    va_end(arg_ptr);
    if (bs->msglen < 0 || bs->msglen >= maxlen) {
-      bs->msg = (char *) realloc_pool_memory(bs->msg, maxlen + 200);
+      bs->msg = (POOLMEM *)realloc_pool_memory(bs->msg, maxlen + 200);
       goto again;
    }
    return bnet_send(bs) < 0 ? 0 : 1;
@@ -570,14 +571,15 @@ char *bnet_sig_to_ascii(BSOCK *bs)
 BSOCK *
 init_bsock(int sockfd, char *who, char *host, int port) 
 {
-   BSOCK *bsock = (BSOCK *) malloc(sizeof(BSOCK));
+   BSOCK *bsock = (BSOCK *)malloc(sizeof(BSOCK));
    if (bsock == NULL) {
       Emsg0(M_ABORT, 0, "Out of memory in init_bsock.\n");
    }
    memset(bsock, 0, sizeof(BSOCK));
    bsock->fd = sockfd;
    bsock->errors = 0;
-   bsock->msg = (char *) get_pool_memory(PM_MESSAGE);
+   bsock->msg = (POOLMEM *)get_pool_memory(PM_MESSAGE);
+   bsock->errmsg = (POOLMEM *)get_pool_memory(PM_MESSAGE);
    bsock->who = bstrdup(who);
    bsock->host = bstrdup(host);
    bsock->port = port;
@@ -597,7 +599,8 @@ dup_bsock(BSOCK *osock)
       Emsg0(M_ABORT, 0, "Out of memory in dup_bsock.\n");
    }
    memcpy(bsock, osock, sizeof(BSOCK));
-   bsock->msg = (char *) get_pool_memory(PM_MESSAGE);
+   bsock->msg = (POOLMEM *)get_pool_memory(PM_MESSAGE);
+   bsock->errmsg = (POOLMEM *)get_pool_memory(PM_MESSAGE);
    bsock->duped = TRUE;
    return bsock;
 }
@@ -625,6 +628,7 @@ void
 term_bsock(BSOCK *bsock)
 {
    free_pool_memory(bsock->msg);
+   free_pool_memory(bsock->errmsg);
    free(bsock->who);
    free(bsock->host);
    free(bsock);
index ef9bc47ada652bc4a485de09cba545278a69c9a2..a3abc674bffc68195e47b40a8b215dedeff425b4 100644 (file)
 
  */
  /* 
-  * Originally written by Kern Sibbald for inclusion in apcupsd.
+  * Originally written by Kern Sibbald for inclusion in apcupsd,
+  *  but heavily modified for Bacula
+  *
+  *   Version $Id$
   */
 
 #include "bacula.h"
@@ -77,12 +80,16 @@ bnet_thread_server(int port, int max_clients, workq_t *client_wq,
    serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
    serv_addr.sin_port = htons(port);
 
+   int tmax = 30 * (60 / 5);         /* wait 30 minutes max */
    for (tlog=0; bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0; tlog -= 5 ) {
       if (tlog <= 0) {
         tlog = 2*60;                 /* Complain every 2 minutes */
          Emsg2(M_WARNING, 0, "Cannot bind port %d: %s. Retrying ...\n", port, strerror(errno));
       }
       sleep(5);
+      if (--tmax <= 0) {
+         Emsg2(M_ABORT, 0, "Cannot bind port %d: %s.\n", port, strerror(errno));
+      }
    }
    listen(sockfd, 5);                /* tell system we are ready */
 
@@ -147,6 +154,7 @@ bnet_thread_server(int port, int max_clients, workq_t *client_wq,
 }   
 
 
+#ifdef REALLY_USED   
 /*
  * Bind an address so that we may accept connections
  * one at a time.
@@ -288,6 +296,7 @@ bnet_accept(BSOCK *bsock, char *who)
    }
 }   
 
+#endif
 
 
 
@@ -295,7 +304,7 @@ bnet_accept(BSOCK *bsock, char *who)
  * The following code will soon be deleted, don't attempt
  * to use it.
  */
-#ifdef dont_have_threads_junk
+#ifdef dont_have_threads
 
 /*
  * This routine is called by the main process to
index 5af82774d5f6c3b7b075d49673af8eef7bb0655d..89a6274f84baa3ac3b2813955806b5dcf3c4810b 100644 (file)
@@ -8,6 +8,8 @@
  *
  *  By Kern Sibbald, May MM
  *
+ *   Version $Id$
+ *
  *  Note, this routine was originally written so that the DEVICE structures
  *  could be shared between the child processes.  Now that the Storage
  *  daemon is threaded, these routines are no longer needed. Rather than
index 3d901b216b52a106db6d6f56818602cff36e9829..15e913ec22d48b93101559a7137689bee2cb98c5 100644 (file)
@@ -3,12 +3,14 @@
  *
  *  Kern Sibbald, May MM
  *
- *     NB: these items are deprecated.  Shared memory was
- *         used in a first version of the Storage daemon
- *         when it forked. Since then it has been converted
- *         to use threads.  However, there are still some
- *         vestiges of the shared memory code that remain and
- *         can be removed.
+ *     NB: these items are deprecated. Shared memory was
+ *        used in a first version of the Storage daemon
+ *        when it forked. Since then it has been converted
+ *        to use threads.  However, there are still some
+ *        vestiges of the shared memory code that remain and
+ *        can be removed.
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
  */
 
 typedef struct s_bshm {
-   int size;                          /* length desired */
-   int perms;                         /* permissions desired */
+   int size;                         /* length desired */
+   int perms;                        /* permissions desired */
 
-   int shmid;                         /* id set by shm_create and shm_open */
-   key_t shmkey;                      /* key set by shm_create */
-   void *shmbuf;                      /* set by shm_open */
+   int shmid;                        /* id set by shm_create and shm_open */
+   key_t shmkey;                     /* key set by shm_create */
+   void *shmbuf;                     /* set by shm_open */
 } BSHM;
index c9ed782bcbecc281cedc77a2c0ad99f654137a65..92b9ded4602b294ebd54ef0af1f3f857f57cd237 100644 (file)
@@ -9,6 +9,7 @@
  * Negative msglen, is special "signal" (no data follows).
  *   See below for SIGNAL codes.
  *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -44,10 +45,10 @@ typedef struct s_bsock {
    int timeout;                       /* time out after this value */
    int terminated;                    /* set when BNET_TERMINATE arrives */
    int duped;                         /* set if duped BSOCK */
-   char *msg;                         /* message pool buffer */
+   POOLMEM *msg;                      /* message pool buffer */
    char *who;                         /* Name of daemon to which we are talking */
    char *host;                        /* Host name/IP */
-   char *errmsg;                      /* edited error message (to be implemented) */
+   POOLMEM *errmsg;                   /* edited error message (to be implemented) */
    RES *res;                          /* Resource to which we are connected */
    struct s_bsock *next;              /* next BSOCK if duped */
 } BSOCK;
index c3f1b31f92f608f1bd9f06c9fe9444cc8bad55bb..dbd7cd8e1a7401d3c01b9614d0d4722d99d54806 100644 (file)
@@ -1,5 +1,7 @@
 /*
  * Bacula time and date routines -- John Walker
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index b298279c04a2a84dbe6489bbdbcef514b948216c..3a324d1881ee4015fd984a1bd0467b8778b419c1 100644 (file)
@@ -1,10 +1,17 @@
 
-/*  Time and date structures and functions.
+/*  
+
+    Time and date structures and functions.
     Date and time are always represented internally
     as 64 bit floating point Julian day numbers and
     fraction.  The day number and fraction are kept
     as separate quantities to avoid round-off of
-    day fraction. John Walker */
+    day fraction. John Walker
+
+     Version $Id$
+
+ */
+
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
index e9e6cd77dea685721f9d7c93e08bd8c5a64dac47..f1658044e9f5039aa9d382b793526e0b8db17bf9 100644 (file)
@@ -4,6 +4,8 @@
  * cram-md5 is based on RFC2104.
  * 
  * Written for Bacula by Kern E. Sibbald, May MMI.
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 81eefa7dfdd5108ea8b1a6819c570b762e7a6803..4f69f3cada1eef0f0dbaf8fcaa8994ab926f72e4 100644 (file)
@@ -3,6 +3,8 @@
  *
  *   By Kern Sibbald, January 2001
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 387a47b1424912ce07d4ede8f3dfcc4c57339ccb..6613b7f6aa82eb35671cdbeed140838c147b0a22 100644 (file)
@@ -1,6 +1,8 @@
 /*
  *  daemon.c by Kern Sibbald
  *
+ *   Version $Id$
+ *
  *   this code is inspired by the Prentice Hall book
  *   "Unix Network Programming" by W. Richard Stevens
  *   and later updated from his book "Advanced Programming
index 29c0319c86f2fc7a61fa86d8dcaa8d510694c94c..3333655826c599a7d3992ddb677b566afbf17b78 100644 (file)
@@ -3,6 +3,8 @@
  *
  *    Kern Sibbald, August MMI
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index bb8e46508f0a538e71145334484f589659b31494..40432aa51e006e7dc8081f3e8d8f9691e783c0e9 100644 (file)
@@ -4,6 +4,8 @@
  * hmac_md5 was based on sample code in RFC2104 (thanks guys).
  * 
  * Adapted to Bacula by Kern E. Sibbald, February MMI.
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index c17616793c5e7eb754a9d2c16a9ded95b4ecc553..fd94021147dd9b446a6ee45891af17ecd893efa5 100755 (executable)
@@ -3,6 +3,8 @@
  *
  *  Kern E. Sibbald, December 2000
  *
+ *  Version $Id$
+ *
  *  These routines are thread safe.
  *
  */
index db20bf0170be33df6b497acfcced658632581a9a..9e07c6a5185b0888ca5621a2e05e80f0e807ff24 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * Lexical scanner for Bacula configuration file
  *
+ *   Version $Id$
+ *
  */
 
 /*
index e295c2d0e265efbd6dcae2f6a88fe626e3a8745d..4b52291818c1d86488e25e43cc5aa80cce3ae365 100644 (file)
@@ -1,10 +1,12 @@
 /*
  *   lex.h  
  *
- *    Lexial scanning of configuration files, used by parsers.
+ *    Lexical scanning of configuration files, used by parsers.
  *
  *   Kern Sibbald, MM  
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 #define _LEX_H
 
 /* Lex get_char() return values */
-#define L_EOF                         (-1)
-#define L_EOL                         (-2)
+#define L_EOF                        (-1)
+#define L_EOL                        (-2)
 
 /* Internal tokens */
-#define T_NONE                        100                              
+#define T_NONE                       100                              
 
 /* Tokens returned by get_token() */
-#define T_EOF                         101
-#define T_NUMBER                      102
-#define T_IPADDR                      103
-#define T_IDENTIFIER                  104
-#define T_STRING                      105
-#define T_QUOTED_STRING               106
-#define T_BOB                         108  /* begin block */
-#define T_EOB                         109  /* end of block */
-#define T_EQUALS                      110
-#define T_COMMA                       111
-#define T_EOL                         112
-#define T_SEMI                        113
-#define T_ERROR                       200
+#define T_EOF                        101
+#define T_NUMBER                     102
+#define T_IPADDR                     103
+#define T_IDENTIFIER                 104
+#define T_STRING                     105
+#define T_QUOTED_STRING              106
+#define T_BOB                        108  /* begin block */
+#define T_EOB                        109  /* end of block */
+#define T_EQUALS                     110
+#define T_COMMA                      111
+#define T_EOL                        112
+#define T_SEMI                       113
+#define T_ERROR                      200
 
 /* Lexical state */
 enum lex_state {
@@ -64,22 +66,22 @@ enum lex_state {
 };
 
 /* Lex scan options */
-#define LOPT_NO_IDENT            0x1  /* No Identifiers -- use string */
+#define LOPT_NO_IDENT           0x1  /* No Identifiers -- use string */
 
 /* Lexical context */
 typedef struct s_lex_context {
-   int options;                       /* scan options */
-   char *fname;                       /* filename */
-   FILE *fd;                          /* file descriptor */
-   char line[MAXSTRING];              /* input line */
-   char str[MAXSTRING];               /* string being scanned */
-   int str_len;                       /* length of string */
-   int line_no;                       /* file line number */
-   int col_no;                        /* char position on line */
-   enum lex_state state;              /* lex_state variable */
-   int ch;                            /* last char/L_VAL returned by get_char */
+   int options;                      /* scan options */
+   char *fname;                      /* filename */
+   FILE *fd;                         /* file descriptor */
+   char line[MAXSTRING];             /* input line */
+   char str[MAXSTRING];              /* string being scanned */
+   int str_len;                      /* length of string */
+   int line_no;                      /* file line number */
+   int col_no;                       /* char position on line */
+   enum lex_state state;             /* lex_state variable */
+   int ch;                           /* last char/L_VAL returned by get_char */
    int token;
-   struct s_lex_context *next;        /* pointer to next lexical context */
+   struct s_lex_context *next;       /* pointer to next lexical context */
 } LEX;
 
 #endif /* _LEX_H */
index b3dc51220645be52dd91c1f2a7c36450e194c074..600a4c4eb229e7e5c4ef6cdc624940b5689d2700 100644 (file)
@@ -1,5 +1,7 @@
 /* 
  * Library includes for Bacula lib directory
+ *
+ *   Version $Id$
  */
 
 /*
@@ -40,4 +42,3 @@
 #include "md5.h"
 
 #include "protos.h"
-
index 9ea7671f8ce91603e3691968048e3fe60407bd4d..9b4b7b805a8ca05f4f56d6a42da9d350ee07b48b 100644 (file)
@@ -13,6 +13,8 @@
  * MD5Context structure, pass it to MD5Init, call MD5Update as
  * needed on buffers full of bytes, and then call MD5Final, which
  * will fill a supplied 16-byte array with the digest.
+ *
+ *   Version $Id$
  */
 
 /* Brutally hacked by John Walker back from ANSI C to K&R (no
index 2a39ad1891db58151908162ea4bfde719a8950ec..53faa028b64db40238350ff39349d9fb0cf206ea 100644 (file)
@@ -2,6 +2,8 @@
  * Bacula MD5 definitions
  *
  *  Kern Sibbald, 2001
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 1762cea4bc9a6af885a0aac67f23fdee09a55502..9eddd47ad156afabba40afea7dd2abe085e33a68 100644 (file)
@@ -16,6 +16,8 @@
  *  with the desired size and it will adjust only if necessary.
  *
  *          Kern E. Sibbald
+ *
+ *   Version $Id$
  */
 
 /*
index 17f8d5671beecbe878814f162d2d5c03a39b274e..5378ea74116b53df85925ef952e4811862553a3d 100644 (file)
@@ -2,6 +2,8 @@
  * Memory Pool prototypes
  *
  *  Kern Sibbald, 2000
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -40,13 +42,13 @@ extern POOLMEM *get_memory(size_t size);
 #define free_memory(x) free_pool_memory(x)
 extern void   free_pool_memory(POOLMEM *buf);
 extern size_t sizeof_pool_memory(POOLMEM *buf);
-extern POOLMEM  *realloc_pool_memory(POOLMEM *buf, size_t size);
-extern POOLMEM  *check_pool_memory_size(POOLMEM *buf, size_t size);
+extern POOLMEM *realloc_pool_memory(POOLMEM *buf, size_t size);
+extern POOLMEM *check_pool_memory_size(POOLMEM *buf, size_t size);
 extern void  close_memory_pool();
 extern void  print_memory_pool_stats();
 
-#define PM_NOPOOL  0                  /* nonpooled memory */
-#define PM_FNAME   1                  /* file name buffer */
-#define PM_MESSAGE 2                  /* daemon message */
-#define PM_EMSG    3                  /* error message */
-#define PM_MAX     PM_EMSG            /* Number of types */
+#define PM_NOPOOL  0                 /* nonpooled memory */
+#define PM_FNAME   1                 /* file name buffer */
+#define PM_MESSAGE 2                 /* daemon message */
+#define PM_EMSG    3                 /* error message */
+#define PM_MAX    PM_EMSG            /* Number of types */
index 41e804e37de12dfcd4cf39457e93812491aaf695..7c911cb7ff30f90b3910806fe3a74615e10cbebe 100755 (executable)
@@ -3,6 +3,8 @@
  *
  *   Kern Sibbald, April 2000 
  *
+ *   Version $Id$
+ *
  */
 
 /*
index 6d3d9c5bd8fbd8b7337619ce3c204466c0bb9cf9..9d111a14d64cc3e51b3f91783dec8954114abc80 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * Define Message Types for Bacula
  *    Kern Sibbald, 2000
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
 #include "bits.h"
 
-#undef  M_DEBUG
-#undef  M_ABORT
-#undef  M_FATAL
-#undef  M_ERROR
-#undef  M_WARNING
-#undef  M_INFO
-#undef  M_MOUNT
-#undef  M_TERM
+#undef M_DEBUG
+#undef M_ABORT
+#undef M_FATAL
+#undef M_ERROR
+#undef M_WARNING
+#undef M_INFO
+#undef M_MOUNT
+#undef M_TERM
 
-#define M_DEBUG     1                 /* debug message */
-#define M_ABORT     2                 /* MUST abort immediately */
-#define M_FATAL     3                 /* Fatal error, stopping job */
-#define M_ERROR     4                 /* Error, but recoverable */
-#define M_WARNING   5                 /* Warning message */
-#define M_INFO      6                 /* Informational message */
-#define M_SAVED     7                 /* Info on saved file */
-#define M_NOTSAVED  8                 /* Info on notsaved file */
-#define M_SKIPPED   9                 /* File skipped by option setting */
-#define M_MOUNT    10                 /* Mount requests */
-#define M_TERM     11                 /* Termination request */
+#define M_DEBUG     1                /* debug message */
+#define M_ABORT     2                /* MUST abort immediately */
+#define M_FATAL     3                /* Fatal error, stopping job */
+#define M_ERROR     4                /* Error, but recoverable */
+#define M_WARNING   5                /* Warning message */
+#define M_INFO     6                 /* Informational message */
+#define M_SAVED     7                /* Info on saved file */
+#define M_NOTSAVED  8                /* Info on notsaved file */
+#define M_SKIPPED   9                /* File skipped by option setting */
+#define M_MOUNT    10                /* Mount requests */
+#define M_TERM    11                 /* Termination request */
 
-#define M_MAX      M_TERM             /* keep this updated ! */
+#define M_MAX     M_TERM             /* keep this updated ! */
 
 /* Define message destination structure */
 /* *** FIXME **** where should be extended to handle multiple values */
 typedef struct s_dest {
    struct s_dest *next;
-   int dest_code;                     /* destination (one of the MD_ codes) */
-   int max_len;                       /* max mail line length */
-   FILE *fd;                          /* file descriptor */
+   int dest_code;                    /* destination (one of the MD_ codes) */
+   int max_len;                      /* max mail line length */
+   FILE *fd;                         /* file descriptor */
    char msg_types[nbytes_for_bits(M_MAX+1)]; /* message type mask */
-   char *where;                       /* filename/program name */
-   char *mail_cmd;                    /* mail command */
-   char *mail_filename;               /* unique mail filename */
+   char *where;                      /* filename/program name */
+   char *mail_cmd;                   /* mail command */
+   char *mail_filename;              /* unique mail filename */
 } DEST;
 
 /* Message Destination values for dest field of DEST */
-#define MD_SYSLOG    1                /* send msg to syslog */
-#define MD_MAIL      2                /* email group of messages */
-#define MD_FILE      3                /* write messages to a file */
-#define MD_APPEND    4                /* append messages to a file */
-#define MD_STDOUT    5                /* print messages */
-#define MD_STDERR    6                /* print messages to stderr */
-#define MD_DIRECTOR  7                /* send message to the Director */
-#define MD_OPERATOR  8                /* email a single message to the operator */
-#define MD_CONSOLE   9                /* send msg to UserAgent or console */
-#define MD_MAIL_ON_ERROR 10           /* email messages if job errors */
+#define MD_SYSLOG    1               /* send msg to syslog */
+#define MD_MAIL      2               /* email group of messages */
+#define MD_FILE      3               /* write messages to a file */
+#define MD_APPEND    4               /* append messages to a file */
+#define MD_STDOUT    5               /* print messages */
+#define MD_STDERR    6               /* print messages to stderr */
+#define MD_DIRECTOR  7               /* send message to the Director */
+#define MD_OPERATOR  8               /* email a single message to the operator */
+#define MD_CONSOLE   9               /* send msg to UserAgent or console */
+#define MD_MAIL_ON_ERROR 10          /* email messages if job errors */
 
 
 void d_msg(char *file, int line, int level, char *fmt,...);
index 6978470c24c045b26e19c3979743f4c065ae3828..da676363a21f9b14fee3868a03bf3348ced013b0 100755 (executable)
@@ -19,6 +19,8 @@
  *     for the resource records.
  *
  *     Kern Sibbald, January MM
+ *
+ *   Version $Id$
  */
 
 /*
index aec35192b979d784fae16ae766d0d291504cb8ca..f1503b73d914d2abf54ccdbe93f121cc027b4390 100644 (file)
@@ -1,3 +1,6 @@
+/*
+ *   Version $Id$
+ */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
@@ -18,7 +21,7 @@
 
  */
 
-struct res_items;                   /* Declare forward referenced structure */ 
+struct res_items;                  /* Declare forward referenced structure */ 
 typedef void (MSG_RES_HANDLER)(LEX *lc, struct res_items *item, int index, int pass);
 
 /* This is the structure that defines
@@ -27,30 +30,30 @@ typedef void (MSG_RES_HANDLER)(LEX *lc, struct res_items *item, int index, int p
  * tables.
  */
 struct res_items {
-   char *name;                        /* Resource name i.e. Director, ... */
-   MSG_RES_HANDLER *handler;          /* Routine storing the resource item */
-   void **value;                      /* Where to store the item */
-   int  code;                         /* item code/additional info */
-   int  flags;                        /* flags: default, required, ... */
-   int  default_value;                /* default value */
+   char *name;                       /* Resource name i.e. Director, ... */
+   MSG_RES_HANDLER *handler;         /* Routine storing the resource item */
+   void **value;                     /* Where to store the item */
+   int code;                         /* item code/additional info */
+   int flags;                        /* flags: default, required, ... */
+   int default_value;                /* default value */
 };
 
 /* For storing name_addr items in res_items table */
 #define ITEM(x) ((void **)&res_all.x)
 
-#define MAX_RES_ITEMS 32              /* maximum resource items per RES */
+#define MAX_RES_ITEMS 32             /* maximum resource items per RES */
 
 /* This is the universal header that is
  * at the beginning of every resource
  * record.
  */
 struct s_reshdr {
-   char *name;                        /* resource name */
-   char *desc;                        /* resource description */
-   int   rcode;                       /* resource id or type */
-   int   refcnt;                      /* reference count for releasing */
+   char *name;                       /* resource name */
+   char *desc;                       /* resource description */
+   int  rcode;                       /* resource id or type */
+   int  refcnt;                      /* reference count for releasing */
    char  item_present[MAX_RES_ITEMS]; /* set if item is present in conf file */
-   struct s_reshdr *next;             /* pointer to next resource of this type */
+   struct s_reshdr *next;            /* pointer to next resource of this type */
 };
 
 typedef struct s_reshdr RES;
@@ -60,26 +63,26 @@ typedef struct s_reshdr RES;
  * This is the structure that defines the
  * resources that are available to this daemon.
  */
-struct s_res {       
-   char *name;                        /* resource name */
-   struct res_items *items;           /* list of resource keywords */
-   int rcode;                         /* code if needed */
-   RES *res_head;                     /* where to store it */
+struct s_res {      
+   char *name;                       /* resource name */
+   struct res_items *items;          /* list of resource keywords */
+   int rcode;                        /* code if needed */
+   RES *res_head;                    /* where to store it */
 };
 
 /* Common Resource definitions */
 
-#define MAX_RES_NAME_LENGTH MAX_NAME_LENGTH-1       /* maximum resource name length */
+#define MAX_RES_NAME_LENGTH MAX_NAME_LENGTH-1      /* maximum resource name length */
 
-#define ITEM_REQUIRED 0x1             /* item required */
-#define ITEM_DEFAULT  0x2             /* default supplied */
+#define ITEM_REQUIRED 0x1            /* item required */
+#define ITEM_DEFAULT  0x2            /* default supplied */
 
 /* Message Resource */
 struct s_res_msgs {
-   RES   hdr;
-   char *mail_cmd;                    /* mail command */
-   char *operator_cmd;                /* Operator command */
-   DEST *dest_chain;                  /* chain of destinations */
+   RES  hdr;
+   char *mail_cmd;                   /* mail command */
+   char *operator_cmd;               /* Operator command */
+   DEST *dest_chain;                 /* chain of destinations */
    char send_msg[nbytes_for_bits(M_MAX+1)];  /* bit array of types */
 };
 typedef struct s_res_msgs MSGS;
@@ -89,7 +92,7 @@ typedef struct s_res_msgs MSGS;
  * resource structure definitions.
  */
 union cu_res {
-   struct s_res_msgs    res_msgs;
+   struct s_res_msgs   res_msgs;
    RES hdr;
 };
 
@@ -97,7 +100,7 @@ typedef union cu_res CURES;
 
 
 /* Configuration routines */
-void  parse_config            __PROTO((char *cf));
+void  parse_config           __PROTO((char *cf));
 void  free_config_resources   __PROTO(());
 
 /* Resource routines */
index 470c2560d1e3c6cae6ce1b40413b880ad936acce..7fc99d14bfcbd2405f5066be97f974076ec4206a 100644 (file)
@@ -1,5 +1,7 @@
 /*
  * Prototypes for lib directory of Bacula
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index d799d107c957ed8af5a67c30c8648981e8d1b939..1fa05ed9c00dedd6b5af3c015b2a08c5088b2126 100644 (file)
@@ -3,10 +3,13 @@
                         Q U E U E
                     Queue Handling Routines
 
-       Taken from smartall by John Walker.
+       Taken from smartall written by John Walker.
 
                  http://www.fourmilab.ch/smartall/
 
+  
+       Version $Id$
+
 */
 
 /*
index e9afef499788b9a66aa312b76cb768ffd5d1fda8..c6cbe1080d7f8b96619c4856aee01450f03767a7 100644 (file)
@@ -1,3 +1,8 @@
+/*
+ *   Version $Id$
+ */
+
+
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
 /*  General purpose queue  */
 
 struct b_queue {
-        struct b_queue *qnext,     /* Next item in queue */
-                     *qprev;       /* Previous item in queue */
+       struct b_queue *qnext,     /* Next item in queue */
+                    *qprev;       /* Previous item in queue */
 };
 
 typedef struct b_queue BQUEUE;
 
 /*  Queue functions  */
 
-void    qinsert(BQUEUE *qhead, BQUEUE *object);
+void   qinsert(BQUEUE *qhead, BQUEUE *object);
 BQUEUE *qnext(BQUEUE *qhead, BQUEUE *qitem);
 BQUEUE *qdchain(BQUEUE *qitem);
 BQUEUE *qremove(BQUEUE *qhead);
index 81850c940c6d9a35300b5312831724d3bd7d165e..dd7558be885bdcf004fb84519c4dc8df38ce8c66 100644 (file)
@@ -4,6 +4,8 @@
  *
  *  Kern Sibbald, January MMI
  *
+ *   Version $Id$
+ *
  *  This code adapted from "Programming with POSIX Threads", by
  *    David R. Butenhof
  *
index 8ba9e98c41f17570532eef406c5a0182d2531253..c91e8d43d0062970e46883975a574dcf992a3520 100644 (file)
@@ -1,12 +1,14 @@
 /*
  * Bacula Thread Read/Write locking code. It permits
- *  multiple readers but only one writer.                 
+ *  multiple readers but only one writer.                
  *
  *  Kern Sibbald, January MMI
  *
  *  This code adapted from "Programming with POSIX Threads", by
  *    David R. Butenhof
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
 typedef struct rwlock_tag {
    pthread_mutex_t   mutex;
-   pthread_cond_t    read;            /* wait for read */
-   pthread_cond_t    write;           /* wait for write */
-   int               valid;           /* set when valid */
-   int               r_active;        /* readers active */
-   int               w_active;        /* writers active */
-   int               r_wait;          /* readers waiting */
-   int               w_wait;          /* writers waiting */
+   pthread_cond_t    read;           /* wait for read */
+   pthread_cond_t    write;          /* wait for write */
+   int              valid;           /* set when valid */
+   int              r_active;        /* readers active */
+   int              w_active;        /* writers active */
+   int              r_wait;          /* readers waiting */
+   int              w_wait;          /* writers waiting */
 } rwlock_t;
 
 #define RWLOCK_VALID  0xfacade
index c1e5c3f73e1fd55d06c1d68ff7af362d77b06950..1b2b0219377b6345c4fa300c1bc4124bf3619554 100644 (file)
@@ -3,6 +3,8 @@
                   Serialisation Support Functions
                          John Walker
 
+  
+     Version $Id$
 */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 7066e776b893727b855869cef992f511740137d8..f3adaab0d890921efba1e0c7f074f5b2f63bcce9 100644 (file)
@@ -1,4 +1,7 @@
-
+/*
+ *
+ *   Version $Id$
+ */
 
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -41,7 +44,7 @@ extern int unserial_string(uint8_t * ptr, char * str);
 
 /*
 
-                         Serialisation Macros
+                        Serialisation Macros
 
     These macros use a uint8_t pointer, ser_ptr, which must be
     defined by the code which uses them.
@@ -52,83 +55,83 @@ extern int unserial_string(uint8_t * ptr, char * str);
 #define __SERIAL_H_ 1
 
 /*  ser_declare  --  Declare ser_ptr locally within a function.  */
-#define ser_declare     uint8_t *ser_ptr
-#define unser_declare   uint8_t *ser_ptr
+#define ser_declare    uint8_t *ser_ptr
+#define unser_declare  uint8_t *ser_ptr
 
 /*  ser_begin(x, s)  --  Begin serialisation into a buffer x of size s.  */
 #define ser_begin(x, s) ser_ptr = ((uint8_t *)(x))
 #define unser_begin(x, s) ser_ptr = ((uint8_t *)(x))
 
-/*  ser_length  --  Determine length in bytes of serialised into a
-                    buffer x.  */
+/*  ser_length --  Determine length in bytes of serialised into a
+                   buffer x.  */
 #define ser_length(x)  (ser_ptr - (uint8_t *)(x))
 #define unser_length(x)  (ser_ptr - (uint8_t *)(x))
 
 /*  ser_end(x, s)  --  End serialisation into a buffer x of size s.  */
-#define ser_end(x, s)   ASSERT(ser_length(x) <= (s))
+#define ser_end(x, s)  ASSERT(ser_length(x) <= (s))
 #define unser_end(x, s)   ASSERT(ser_length(x) <= (s))
 
 /*  ser_check(x, s)  --  Verify length of serialised data in buffer x is
-                         expected length s.  */
+                        expected length s.  */
 #define ser_check(x, s) ASSERT(ser_length(x) == (s))
 
-/*                          Serialisation                   */
+/*                         Serialisation                   */
 
 /*  8 bit signed integer  */
-#define ser_int8(x)     *ser_ptr++ = (x)
+#define ser_int8(x)    *ser_ptr++ = (x)
 /*  8 bit unsigned integer  */
-#define ser_uint8(x)    *ser_ptr++ = (x)
+#define ser_uint8(x)   *ser_ptr++ = (x)
 
 /*  16 bit signed integer  */
-#define ser_int16(x)    serial_int16(&ser_ptr, x)
+#define ser_int16(x)   serial_int16(&ser_ptr, x)
 /*  16 bit unsigned integer  */
-#define ser_uint16(x)   serial_uint16(&ser_ptr, x)
+#define ser_uint16(x)  serial_uint16(&ser_ptr, x)
 
 /*  32 bit signed integer  */
-#define ser_int32(x)    serial_int32(&ser_ptr, x)
+#define ser_int32(x)   serial_int32(&ser_ptr, x)
 /*  32 bit unsigned integer  */
-#define ser_uint32(x)   serial_uint32(&ser_ptr, x)
+#define ser_uint32(x)  serial_uint32(&ser_ptr, x)
 
 /*  64 bit signed integer  */
-#define ser_int64(x)    serial_int64(&ser_ptr, x)
+#define ser_int64(x)   serial_int64(&ser_ptr, x)
 /*  64 bit unsigned integer  */
-#define ser_uint64(x)   serial_uint64(&ser_ptr, x)
+#define ser_uint64(x)  serial_uint64(&ser_ptr, x)
 
 
 /*  64 bit IEEE floating point number  */
-#define ser_float64(x)  serial_float64(&ser_ptr, x)
+#define ser_float64(x) serial_float64(&ser_ptr, x)
 
 /*  128 bit signed integer  */
-#define ser_int128(x)   memcpy(ser_ptr, x, sizeof(int128_t)), ser_ptr += sizeof(int128_t)
+#define ser_int128(x)  memcpy(ser_ptr, x, sizeof(int128_t)), ser_ptr += sizeof(int128_t)
 
 /*  Binary byte stream len bytes not requiring serialisation  */
 #define ser_bytes(x, len) memcpy(ser_ptr, (x), (len)), ser_ptr += (len)
 
-/*  Binary byte stream not requiring serialisation (length obtained by sizeof)  */
-#define ser_buffer(x)   ser_bytes((x), (sizeof (x)))
+/*  Binary byte stream not requiring serialisation (length obtained by sizeof) */
+#define ser_buffer(x)  ser_bytes((x), (sizeof (x)))
 
 /* Binary string not requiring serialization */
-#define ser_string(x)   ser_ptr += serial_string(ser_ptr, (x))
+#define ser_string(x)  ser_ptr += serial_string(ser_ptr, (x))
 
-/*                         Unserialisation                  */
+/*                        Unserialisation                  */
 
 /*  8 bit signed integer  */
-#define unser_int8(x)   (x) = *ser_ptr++
+#define unser_int8(x)  (x) = *ser_ptr++
 /*  8 bit unsigned integer  */
-#define unser_uint8(x)  (x) = *ser_ptr++
+#define unser_uint8(x) (x) = *ser_ptr++
 
 /*  16 bit signed integer  */
-#define unser_int16(x)  (x) = unserial_int16(&ser_ptr)
+#define unser_int16(x) (x) = unserial_int16(&ser_ptr)
 /*  16 bit unsigned integer  */
 #define unser_uint16(x) (x) = unserial_uint16(&ser_ptr)
 
 /*  32 bit signed integer  */
-#define unser_int32(x)  (x) = unserial_int32(&ser_ptr)
+#define unser_int32(x) (x) = unserial_int32(&ser_ptr)
 /*  32 bit unsigned integer  */
 #define unser_uint32(x) (x) = unserial_uint32(&ser_ptr)
 
 /*  64 bit signed integer  */
-#define unser_int64(x)  (x) = unserial_int64(&ser_ptr)
+#define unser_int64(x) (x) = unserial_int64(&ser_ptr)
 /*  64 bit unsigned integer  */
 #define unser_uint64(x) (x) = unserial_uint64(&ser_ptr)
 
@@ -141,7 +144,7 @@ extern int unserial_string(uint8_t * ptr, char * str);
 /*  Binary byte stream len bytes not requiring serialisation  */
 #define unser_bytes(x, len) memcpy((x), ser_ptr, (len)), ser_ptr += (len)
 
-/*  Binary byte stream not requiring serialisation (length obtained by sizeof)  */
+/*  Binary byte stream not requiring serialisation (length obtained by sizeof) */
 #define unser_buffer(x)  unser_bytes((x), (sizeof (x)))
 
 /* Binary string not requiring serialization */
index 5cb3c147be5c1daeafe44fb40fd42195cdad57cb..0b9fe5bc792cf2d232474782e611483619403c1a 100644 (file)
@@ -2,6 +2,8 @@
  *  Signal handlers for Bacula daemons
  *
  *   Kern Sibbald, April 2000
+ *
+ *   Version $Id$
  * 
  * Note, we probably should do a core dump for the serious
  * signals such as SIGBUS, SIGPFE, ... 
index dfc822c4d61f597af0c08acd04562edfac754631..c5596e5d2cb762d26f4a35ff4bb32b5f16c57cb2 100644 (file)
@@ -13,6 +13,9 @@
 
                  http://www.fourmilab.ch/smartall/
 
+  
+        Version $Id$
+
 */
 
 /*
index 13acdf002a9f9175510aecd068359092aa273ebb..5405aa2e5c8208c53972717aa14cca6ddcbcd9be 100644 (file)
@@ -1,6 +1,8 @@
 /*
 
-        Definitions for the smart memory allocator
+       Definitions for the smart memory allocator
+  
+     Version $Id$
 
 */
 
 typedef enum {False = 0, True = 1} Boolean;
 
 extern void *sm_malloc(char *fname, int lineno, unsigned int nbytes),
-            *sm_calloc(char *fname, int lineno,
-                unsigned int nelem, unsigned int elsize),
-            *sm_realloc(char *fname, int lineno, void *ptr, unsigned int size),
-            *actuallymalloc(unsigned int size),
-            *actuallycalloc(unsigned int nelem, unsigned int elsize),
-            *actuallyrealloc(void *ptr, unsigned int size);
+           *sm_calloc(char *fname, int lineno,
+               unsigned int nelem, unsigned int elsize),
+           *sm_realloc(char *fname, int lineno, void *ptr, unsigned int size),
+           *actuallymalloc(unsigned int size),
+           *actuallycalloc(unsigned int nelem, unsigned int elsize),
+           *actuallyrealloc(void *ptr, unsigned int size);
 extern void sm_free(char *fname, int lineno, void *fp);
 extern void actuallyfree(void *cp),
-            sm_dump(Boolean bufdump), sm_static(int mode);
+           sm_dump(Boolean bufdump), sm_static(int mode);
 extern void sm_new_owner(char *fname, int lineno, char *buf);
 
 #ifdef SMCHECK
@@ -77,7 +79,7 @@ extern int sm_check_rtn(char *fname, int lineno, Boolean bufdump);
 #define sm_check_rtn(f, l, fl) 1
 
 extern void *b_malloc();
-#define malloc(x) b_malloc(__FILE__, __LINE__, (x))                  
+#define malloc(x) b_malloc(__FILE__, __LINE__, (x))                 
 
 
 #endif
index 1235e7ffb1cd203777f72d5aeafb60b51b4a3947..b8e58033788b1fd3f56ef1b45fb238bf1ef10daf 100644 (file)
@@ -2,6 +2,8 @@
  *   util.c  miscellaneous utility subroutines for Bacula
  * 
  *    Kern Sibbald, MM
+ *
+ *   Version $Id$
  */
 
 /*
index 152b66e3af5a90707e3c0a84cabf462383c55db6..0691f455df64993b250fced6348a2d107c08132c 100644 (file)
@@ -7,6 +7,8 @@
  *  This code inspired from "Programming with POSIX Threads", by
  *    David R. Butenhof
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
  */
 typedef struct waitq_ele_tag {
    struct waitq_ele_tag *next;
-   int               done_flag;       /* predicate for wait */
-   pthread_cont_t    done;            /* wait for completion */
-   void             *msg;             /* message to be passed */
+   int              done_flag;       /* predicate for wait */
+   pthread_cont_t    done;           /* wait for completion */
+   void            *msg;             /* message to be passed */
 } waitq_ele_t;
 
 /* 
  * Structure describing a wait queue
  */
 typedef struct workq_tag {
-   pthread_mutex_t   mutex;           /* queue access control */
-   pthread_cond_t    wait_req;        /* wait for OK */
-   int               num_msgs;        /* number of waiters */
-   waitq_ele_t       *first;          /* wait queue first item */
-   waitq_ele_t       *last;           /* wait queue last item */
+   pthread_mutex_t   mutex;          /* queue access control */
+   pthread_cond_t    wait_req;       /* wait for OK */
+   int              num_msgs;        /* number of waiters */
+   waitq_ele_t      *first;          /* wait queue first item */
+   waitq_ele_t      *last;           /* wait queue last item */
 } workq_t;
 
 extern int waitq_init(waitq_t *wq);
index 2a5d51275535de9fe47032d0880e1463bd213220..f8b01065bb81dd9a1806a9f5bdee04f38ca6a594 100755 (executable)
@@ -4,6 +4,8 @@
  *
  *  Kern Sibbald, January MMI
  *
+ *   Version $Id$
+ *
  *  This code adapted from "Programming with POSIX Threads", by
  *    David R. Butenhof
  *
index a0226f28473ebae3887b0e902c225fb0fc40bb65..92c66e1f5003c6b69133076faaf4aac7fecc600a 100644 (file)
@@ -7,6 +7,7 @@
  *  This code adapted from "Programming with POSIX Threads", by
  *    David R. Butenhof
  *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
  */
 typedef struct workq_ele_tag {
    struct workq_ele_tag *next;
-   void                 *data;
+   void                *data;
 } workq_ele_t;
 
 /* 
  * Structure describing a work queue
  */
 typedef struct workq_tag {
-   pthread_mutex_t   mutex;           /* queue access control */
-   pthread_cond_t    work;            /* wait for work */
-   pthread_attr_t    attr;            /* create detached threads */
-   workq_ele_t       *first, *last;   /* work queue */
-   int               valid;           /* queue initialized */
-   int               quit;            /* workq should quit */
-   int               max_workers;     /* max threads */
-   int               num_workers;     /* current threads */
-   int               idle_workers;    /* idle threads */
-   void              (*engine)(void *arg); /* user engine */
+   pthread_mutex_t   mutex;          /* queue access control */
+   pthread_cond_t    work;           /* wait for work */
+   pthread_attr_t    attr;           /* create detached threads */
+   workq_ele_t      *first, *last;   /* work queue */
+   int              valid;           /* queue initialized */
+   int              quit;            /* workq should quit */
+   int              max_workers;     /* max threads */
+   int              num_workers;     /* current threads */
+   int              idle_workers;    /* idle threads */
+   void             (*engine)(void *arg); /* user engine */
 } workq_t;
 
 #define WORKQ_VALID  0xdec1992
 
 extern int workq_init(
-              workq_t *wq,
-              int     threads,        /* maximum threads */
-              void    (*engine)(void *)   /* engine routine */
-                    );
+             workq_t *wq,
+             int     threads,        /* maximum threads */
+             void    (*engine)(void *)   /* engine routine */
+                   );
 extern int workq_destroy(workq_t *wq);
 extern int workq_add(workq_t *wq, void *data);
 
index 83f95674df37c075d9f865bf2190ce1fadf75b53..35a78771dc92d41f4f9ca2d6b99d7516cd35d307 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * Append code for Storage daemon
  *  Kern Sibbald, May MM
+ *
+ *  Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index b064dd90701b52fe8a7903bfafe96eb58536f56d..d0f13a4b7aec0d1e5a05e6f8d88ccb5048916bdb 100644 (file)
@@ -3,7 +3,8 @@
  *   Reqests/commands from the Director are handled in dircmd.c
  *
  *   Kern Sibbald, December 2000
- *                           
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index dd76c767b50651e6612580021b61008df3f2b75e..77a41a97035752afbb2f860bc1819bd6f77a244f 100644 (file)
@@ -2,6 +2,8 @@
  * Authenticate caller
  *
  *   Kern Sibbald, October 2000
+ *
+ *   Version $Id$
  * 
  */
 /*
index 0ef4c84b277ea15eb866cce0f26e27f765c5da4a..40da3c4006beac562744bb9a6194f38b649046ae 100644 (file)
@@ -4,7 +4,7 @@
  *
  *   Kern E. Sibbald
  *
- *    $Id$
+ *   Version $Id$
  *
  */
 /*
index 9b648a6a6f825aa4201c64b4441ebb0e1a8c92bb..f36d742159761c3b7861ef37d16ca99b5b92b8a0 100644 (file)
@@ -4,6 +4,8 @@
  *
  *             Kern Sibbald, March MMI
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index b376f3b492549f8bbdcabaa4a8f1f34bc78d5d7e..b1b51e77a6f00a9fcc0a8fbc23456d5043939c4f 100644 (file)
@@ -3,6 +3,8 @@
  *
  *    Kern Sibbald
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 #ifndef __BLOCK_H
 #define __BLOCK_H 1
 
-#define MAX_BLOCK_LENGTH    500001      /* this is a sort of sanity check */
-#define DEFAULT_BLOCK_SIZE (512 * 126)  /* 64,512 N.B. do not use 65,636 here */
+#define MAX_BLOCK_LENGTH    500001     /* this is a sort of sanity check */
+#define DEFAULT_BLOCK_SIZE (512 * 126) /* 64,512 N.B. do not use 65,636 here */
 
 /* Block Header definitions. */
 #define BLKHDR_ID        "BB01"
 #define BLKHDR_ID_LENGTH  4
-#define BLKHDR_CS_LENGTH  4             /* checksum length */
-#define BLKHDR_LENGTH    16             /* Total length */
+#define BLKHDR_CS_LENGTH  4            /* checksum length */
+#define BLKHDR_LENGTH   16             /* Total length */
 
 /*
  * This is the Media structure for a block header
@@ -58,21 +60,21 @@ typedef struct s_block_hdr {
  *  This is the memory structure for a device block.
  */
 typedef struct s_dev_block {
-   struct s_dev_block *next;          /* pointer to next one */
+   struct s_dev_block *next;         /* pointer to next one */
    /* binbuf is the number of bytes remaining
     * in the buffer. For writes, it is bytes not yet written.
     * For reads, it is remaining bytes not yet read.
     */
-   uint32_t binbuf;                   /* bytes in buffer */
-   uint32_t block_len;                /* length of current block read */
-   uint32_t buf_len;                  /* max/default block length */
-   uint32_t BlockNumber;              /* sequential block number */
-   uint32_t read_len;                 /* bytes read into buffer */  
-   int failed_write;                  /* set if write failed */
-   char *bufp;                        /* pointer into buffer */
-   char *buf;                         /* actual data buffer. This is a 
-                                       * Pool buffer!   
-                                       */
+   uint32_t binbuf;                  /* bytes in buffer */
+   uint32_t block_len;               /* length of current block read */
+   uint32_t buf_len;                 /* max/default block length */
+   uint32_t BlockNumber;             /* sequential block number */
+   uint32_t read_len;                /* bytes read into buffer */  
+   int failed_write;                 /* set if write failed */
+   char *bufp;                       /* pointer into buffer */
+   char *buf;                        /* actual data buffer. This is a 
+                                      * Pool buffer!   
+                                      */
 } DEV_BLOCK;
 
 #endif
index fbbdb52a52e7651d94b6f3421f3ed64bc6f46793..d8c3cefeb580a72da2c523c20a417cbc0a29c366 100644 (file)
@@ -2,7 +2,7 @@
  *
  *  Dumb program to do an "ls" of a Bacula 1.0 mortal file.
  *
- *   $Id$
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index b3483fbe99221b92609a737a3acde9bccb60f135..c8f26b3a34e736673dac37adef6eadf01e9da20d 100644 (file)
@@ -7,7 +7,7 @@
  *   Kern E. Sibbald, December 2001
  *
  *
- *   $Id$
+ *   Version $Id$
  */
 /*
    Copyright (C) 2001, 2002 Kern Sibbald and John Walker
index 9dcb553dd9e0fcf2b6e1095ed3f0075e837c7891..53cd5f8aa4dfdd60930f5772c925bd4afff7cf19 100644 (file)
@@ -10,7 +10,7 @@
  *   Note, this program reads stored.conf, and will only
  *     talk to devices that are configured.
  *
- *   $Id$
+ *   Version $Id$
  *
  */
 /*
index a5fa9399a1ebe5d26ea5ed37d7008890a54e8aa5..32cd48dec7765391c802cc443cb0e59c13026101 100644 (file)
@@ -25,6 +25,8 @@
  *     a consequence has lead to something more contored than is
  *     really necessary -- KES.  Note, this contortion has been
  *     corrected to a large extent by a rewrite (Apr MMI).
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index f71b77f83f4dbcc62f63238099c89753ed5fd19e..cb9845b5fac12eb1788fcb6dd84b745aad66311a 100644 (file)
@@ -2,6 +2,8 @@
  * Definitions for using the Device functions in Bacula
  *  Tape and File storage access
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 #define READ_ONLY  1
 
 /* Generic status bits returned from status_dev() */
-#define MT_TAPE      (1<<0)                /* is tape device */
-#define MT_EOF       (1<<1)                /* just read EOF */
-#define MT_BOT       (1<<2)                /* at beginning of tape */
-#define MT_EOT       (1<<3)                /* end of tape reached */
-#define MT_SM        (1<<4)                /* DDS setmark */
-#define MT_EOD       (1<<5)                /* DDS at end of data */
-#define MT_WR_PROT   (1<<6)                /* tape write protected */
-#define MT_ONLINE    (1<<7)                /* tape online */
-#define MT_DR_OPEN   (1<<8)                /* tape door open */
-#define MT_IM_REP_EN (1<<9)                /* immediate report enabled */
+#define MT_TAPE      (1<<0)               /* is tape device */
+#define MT_EOF      (1<<1)                /* just read EOF */
+#define MT_BOT      (1<<2)                /* at beginning of tape */
+#define MT_EOT      (1<<3)                /* end of tape reached */
+#define MT_SM       (1<<4)                /* DDS setmark */
+#define MT_EOD      (1<<5)                /* DDS at end of data */
+#define MT_WR_PROT   (1<<6)               /* tape write protected */
+#define MT_ONLINE    (1<<7)               /* tape online */
+#define MT_DR_OPEN   (1<<8)               /* tape door open */
+#define MT_IM_REP_EN (1<<9)               /* immediate report enabled */
 
 
 /* Bits for device capabilities */
-#define CAP_EOF        0x001          /* has MTWEOF */
-#define CAP_BSR        0x002          /* has MTBSR */
-#define CAP_BSF        0x004          /* has MTBSF */
-#define CAP_FSR        0x008          /* has MTFSR */
-#define CAP_FSF        0x010          /* has MTFSF */
-#define CAP_EOM        0x020          /* has MTEOM */
-#define CAP_REM        0x040          /* is removable media */
-#define CAP_RACCESS    0x080          /* is random access device */
-#define CAP_AUTOMOUNT  0x100          /* Read device at start to see what is there */
-#define CAP_LABEL      0x200          /* Label blank tapes */
-#define CAP_ANONVOLS   0x400          /* Mount without knowing volume name */
-#define CAP_ALWAYSOPEN 0x800          /* always keep device open */
+#define CAP_EOF        0x001         /* has MTWEOF */
+#define CAP_BSR        0x002         /* has MTBSR */
+#define CAP_BSF        0x004         /* has MTBSF */
+#define CAP_FSR        0x008         /* has MTFSR */
+#define CAP_FSF        0x010         /* has MTFSF */
+#define CAP_EOM        0x020         /* has MTEOM */
+#define CAP_REM        0x040         /* is removable media */
+#define CAP_RACCESS    0x080         /* is random access device */
+#define CAP_AUTOMOUNT  0x100         /* Read device at start to see what is there */
+#define CAP_LABEL      0x200         /* Label blank tapes */
+#define CAP_ANONVOLS   0x400         /* Mount without knowing volume name */
+#define CAP_ALWAYSOPEN 0x800         /* always keep device open */
 
 
 /* Tape state bits */
-#define ST_OPENED    0x001            /* set when device opened */
-#define ST_TAPE      0x002            /* is a tape device */  
-#define ST_LABEL     0x004            /* label found */
+#define ST_OPENED    0x001           /* set when device opened */
+#define ST_TAPE      0x002           /* is a tape device */  
+#define ST_LABEL     0x004           /* label found */
 #define ST_MALLOC    0x008            /* dev packet malloc'ed in init_dev() */
-#define ST_APPEND    0x010            /* ready for Bacula append */
-#define ST_READ      0x020            /* ready for Bacula read */
-#define ST_EOT       0x040            /* at end of tape */
-#define ST_WEOT      0x080            /* Got EOT on write */
-#define ST_EOF       0x100            /* Read EOF i.e. zero bytes */
-#define ST_NEXTVOL   0x200            /* Start writing on next volume */
-#define ST_SHORT     0x400            /* Short block read */
+#define ST_APPEND    0x010           /* ready for Bacula append */
+#define ST_READ      0x020           /* ready for Bacula read */
+#define ST_EOT      0x040            /* at end of tape */
+#define ST_WEOT      0x080           /* Got EOT on write */
+#define ST_EOF      0x100            /* Read EOF i.e. zero bytes */
+#define ST_NEXTVOL   0x200           /* Start writing on next volume */
+#define ST_SHORT     0x400           /* Short block read */
 
 /* dev_blocked states (mutually exclusive) */
 #define BST_NOT_BLOCKED       0       /* not blocked */
-#define BST_UNMOUNTED         1       /* User unmounted device */
+#define BST_UNMOUNTED        1       /* User unmounted device */
 #define BST_WAITING_FOR_SYSOP 2       /* Waiting for operator to mount tape */
 #define BST_DOING_ACQUIRE     3       /* Opening/validating/moving tape */
 #define BST_WRITING_LABEL     4       /* Labeling a tape */  
 /* Volume Catalog Information structure definition */
 typedef struct s_volume_catalog_info {
    /* Media info for the current Volume */
-   uint32_t VolCatJobs;               /* number of jobs on this Volume */
-   uint32_t VolCatFiles;              /* Number of files */
-   uint32_t VolCatBlocks;             /* Number of blocks */
-   uint64_t VolCatBytes;              /* Number of bytes written */
-   uint32_t VolCatMounts;             /* Number of mounts this volume */
-   uint32_t VolCatErrors;             /* Number of errors this volume */
-   uint32_t VolCatWrites;             /* Number of writes this volume */
-   uint32_t VolCatReads;              /* Number of reads this volume */
-   uint32_t VolCatRecycles;           /* Number of recycles this volume */
-   uint64_t VolCatMaxBytes;           /* max bytes to write */
+   uint32_t VolCatJobs;              /* number of jobs on this Volume */
+   uint32_t VolCatFiles;             /* Number of files */
+   uint32_t VolCatBlocks;            /* Number of blocks */
+   uint64_t VolCatBytes;             /* Number of bytes written */
+   uint32_t VolCatMounts;            /* Number of mounts this volume */
+   uint32_t VolCatErrors;            /* Number of errors this volume */
+   uint32_t VolCatWrites;            /* Number of writes this volume */
+   uint32_t VolCatReads;             /* Number of reads this volume */
+   uint32_t VolCatRecycles;          /* Number of recycles this volume */
+   uint64_t VolCatMaxBytes;          /* max bytes to write */
    uint64_t VolCatCapacityBytes;      /* capacity estimate */
-   char VolCatStatus[20];             /* Volume status */
+   char VolCatStatus[20];            /* Volume status */
    char VolCatName[MAX_NAME_LENGTH];  /* Desired volume to mount */
 } VOLUME_CAT_INFO;
 
 
 /* Device structure definition */
 typedef struct s_device {
-   struct s_device *next;             /* pointer to next open device */
-   pthread_mutex_t mutex;             /* access control */
-   pthread_cond_t wait;               /* thread wait variable */
+   struct s_device *next;            /* pointer to next open device */
+   pthread_mutex_t mutex;            /* access control */
+   pthread_cond_t wait;              /* thread wait variable */
    pthread_cond_t wait_next_vol;      /* wait for tape to be mounted */
-   pthread_t no_wait_id;              /* this thread must not wait */
-   int dev_blocked;                   /* set if we must wait (i.e. change tape) */
-   int num_waiting;                   /* number of threads waiting */
-   int num_writers;                   /* number of writing threads */
-   int use_count;                     /* usage count on this device */
-   int fd;                            /* file descriptor */
-   int capabilities;                  /* capabilities mask */
-   int state;                         /* state mask */
-   int dev_errno;                     /* Our own errno */
-   int mode;                          /* read/write modes */
-   char *dev_name;                    /* device name */
-   char *errmsg;                      /* nicely edited error message */
-   uint32_t block_num;                /* current block number base 0 */
-   uint32_t file;                     /* current file number base 0 */
+   pthread_t no_wait_id;             /* this thread must not wait */
+   int dev_blocked;                  /* set if we must wait (i.e. change tape) */
+   int num_waiting;                  /* number of threads waiting */
+   int num_writers;                  /* number of writing threads */
+   int use_count;                    /* usage count on this device */
+   int fd;                           /* file descriptor */
+   int capabilities;                 /* capabilities mask */
+   int state;                        /* state mask */
+   int dev_errno;                    /* Our own errno */
+   int mode;                         /* read/write modes */
+   char *dev_name;                   /* device name */
+   char *errmsg;                     /* nicely edited error message */
+   uint32_t block_num;               /* current block number base 0 */
+   uint32_t file;                    /* current file number base 0 */
    uint32_t LastBlockNumWritten;      /* last block written */
-   uint32_t min_block_size;           /* min block size */
-   uint32_t max_block_size;           /* max block size */
-   uint32_t max_volume_jobs;          /* max jobs to put on one volume */
-   int64_t max_volume_files;          /* max files to put on one volume */
-   int64_t max_volume_size;           /* max bytes to put on one volume */
-   int64_t max_file_size;             /* max file size in bytes */
-   int64_t volume_capacity;           /* advisory capacity */
-   uint32_t max_rewind_wait;          /* max secs to allow for rewind */
-   void *device;                      /* pointer to Device Resource */
-
-   VOLUME_CAT_INFO VolCatInfo;        /* Volume Catalog Information */
-   struct Volume_Label VolHdr;        /* Actual volume label */
+   uint32_t min_block_size;          /* min block size */
+   uint32_t max_block_size;          /* max block size */
+   uint32_t max_volume_jobs;         /* max jobs to put on one volume */
+   int64_t max_volume_files;         /* max files to put on one volume */
+   int64_t max_volume_size;          /* max bytes to put on one volume */
+   int64_t max_file_size;            /* max file size in bytes */
+   int64_t volume_capacity;          /* advisory capacity */
+   uint32_t max_rewind_wait;         /* max secs to allow for rewind */
+   void *device;                     /* pointer to Device Resource */
+
+   VOLUME_CAT_INFO VolCatInfo;       /* Volume Catalog Information */
+   struct Volume_Label VolHdr;       /* Actual volume label */
 
 } DEVICE;
 
@@ -170,7 +172,7 @@ typedef struct s_device {
  *  dependent. Arrgggg!
  */
 #ifndef MTEOM
-#ifdef  MTSEOD
+#ifdef MTSEOD
 #define MTEOM MTSEOD
 #endif
 #ifdef MTEOD
index 629fff8515e706aa2a4260fa9128bc89e895c477..9eb02c702a2c1b5f214d815895df86238290708b 100644 (file)
@@ -26,6 +26,7 @@
  *
  *   Kern Sibbald, MM, MMI
  *                           
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -460,7 +461,7 @@ mount_next_vol:
       }
       /* *****FIXME**** we might do some checking for files too */
       if (dev_is_tape(dev)) {
-         Jmsg(jcr, M_INFO, 0, _("Ready to write at EOM File=%d\n"), dev_file(dev));
+         Jmsg(jcr, M_INFO, 0, _("Ready to append at EOM File=%d.\n"), dev_file(dev));
         if (dev->VolCatInfo.VolCatFiles != dev_file(dev) + 1) {
            /* ****FIXME**** this should refuse to write on tape */
             Jmsg(jcr, M_INFO, 0, _("Hey! Num files mismatch! Catalog Files=%d\n"), dev->VolCatInfo.VolCatFiles);
index 4b81b143695e9fd90227f71360f5857a81937f73..97b66a0c524f0c27c2480d0bf791e587a1d8988d 100644 (file)
@@ -9,6 +9,8 @@
  *    File daemon commands are handled in fdcmd.c
  *
  *     Kern Sibbald, May MMI
+ *
+ *   Version $Id$
  *  
  */
 /*
index 1e4a3ece203bdd07610b14d61267b2f7345eb019..6280a8a12fdab38265cfbf6695bb66755768974b 100644 (file)
@@ -6,6 +6,8 @@
  *  then when the Storage daemon receives a proper connection from
  *  the File daemon, control is passed here to handle the 
  *  subsequent File daemon commands.
+ *
+ *   Version $Id$
  * 
  */
 /*
index 2866a1f2594c2aa23b3af90e90c379a5280bf420..9533f702ee5eb945d28bad28bd706321c0308258 100644 (file)
@@ -1,6 +1,8 @@
 /*
  *   Job control and execution for Storage Daemon
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 8287cdffe2f4c79388136c65cc0ebe9562e613ec..f1d85154d581cf1e73787d6b813336072753f5b6 100644 (file)
@@ -4,6 +4,8 @@
  *
  *   Kern Sibbald, MM
  *                           
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index f76b898c9ade1e96929a2a96c902429e857b336a..e83494a21ea2dfb77f11f4f0661519404763cac1 100644 (file)
@@ -1,5 +1,7 @@
 /*
  * Protypes for stored
+ *
+ *   Version $Id$
  */
 
 /*
index 8309a6558b9fa8ff3c26dddfdec8794ede7e05a4..8d3c719de873be4a0963d2291605b7b4f86eeabb 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * Read code for Storage daemon
  *     Kern Sibbald, November MM
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 92a8ea1536eaad6edaebe0ede3bc23c1e85c3a3c..382cb54792c1157caf314f7e64f416bfaaf30705 100644 (file)
@@ -4,6 +4,8 @@
  *
  *             Kern Sibbald, April MMI
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index 6cf5c1f7d7ab09bf9a7b17cf8dbaf58363987d14..19a195807f16c972cc2bf26f1143352c881e318c 100644 (file)
@@ -2,6 +2,8 @@
  * Record, and label definitions for Bacula
  *  media data format.
  *
+ *   Version $Id$
+ *
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 #define __RECORD_H 1
 
 /* Return codes from read_device_volume_label() */
-#define VOL_NOT_READ      0               /* Volume label not read */
-#define VOL_OK            1               /* volume name OK */
-#define VOL_NO_LABEL      2               /* volume not labeled */
-#define VOL_IO_ERROR      3               /* volume I/O error */
-#define VOL_NAME_ERROR    4               /* Volume name mismatch */
-#define VOL_CREATE_ERROR  5               /* Error creating label */
-#define VOL_VERSION_ERROR 6               /* Bacula version error */
-#define VOL_LABEL_ERROR   7               /* Bad label type */
+#define VOL_NOT_READ     0               /* Volume label not read */
+#define VOL_OK           1               /* volume name OK */
+#define VOL_NO_LABEL     2               /* volume not labeled */
+#define VOL_IO_ERROR     3               /* volume I/O error */
+#define VOL_NAME_ERROR   4               /* Volume name mismatch */
+#define VOL_CREATE_ERROR  5              /* Error creating label */
+#define VOL_VERSION_ERROR 6              /* Bacula version error */
+#define VOL_LABEL_ERROR   7              /* Bad label type */
 
 
 /* Length of Record Header (5 * 4 bytes) */
@@ -60,17 +62,17 @@ typedef struct s_record_hdr {
  *  This is the memory structure for the record header.
  */
 typedef struct s_dev_rec {
-   int      sync;                     /* synchronous */
-   uint32_t File;                     /* File number, returned if sync set */
-   uint32_t Block;                    /* Block number, returned if sync set */
-   uint32_t VolSessionId;             /* sequential id within this session */
-   uint32_t VolSessionTime;           /* session start time */
-   int32_t  FileIndex;                /* sequential file number */
-   int32_t  Stream;                   /* stream number */
-   uint32_t data_len;                 /* current record length */
-   uint32_t remainder;                /* remaining bytes to read/write */
+   int     sync;                     /* synchronous */
+   uint32_t File;                    /* File number, returned if sync set */
+   uint32_t Block;                   /* Block number, returned if sync set */
+   uint32_t VolSessionId;            /* sequential id within this session */
+   uint32_t VolSessionTime;          /* session start time */
+   int32_t  FileIndex;               /* sequential file number */
+   int32_t  Stream;                  /* stream number */
+   uint32_t data_len;                /* current record length */
+   uint32_t remainder;               /* remaining bytes to read/write */
    uint8_t  ser_buf[RECHDR_LENGTH];   /* serialized record header goes here */
-   char *data;                        /* Record data. This MUST be a memory pool item */
+   char *data;                       /* Record data. This MUST be a memory pool item */
 } DEV_RECORD;
 
 
@@ -79,11 +81,11 @@ typedef struct s_dev_rec {
  * Note, these values are negative to distinguish them
  * from user records where the FileIndex is forced positive.
  */
-#define PRE_LABEL   -1                /* Vol label on unwritten tape */
-#define VOL_LABEL   -2                /* Volume label first file */
-#define EOM_LABEL   -3                /* Writen at end of tape */        
-#define SOS_LABEL   -4                /* Start of Session */
-#define EOS_LABEL   -5                /* End of Session */
+#define PRE_LABEL   -1               /* Vol label on unwritten tape */
+#define VOL_LABEL   -2               /* Volume label first file */
+#define EOM_LABEL   -3               /* Writen at end of tape */        
+#define SOS_LABEL   -4               /* Start of Session */
+#define EOS_LABEL   -5               /* End of Session */
  
 
 /* 
@@ -95,20 +97,20 @@ struct Volume_Label {
    * in the DEVICE buffer, but are not actually written
    * to the tape.
    */
-  int32_t LabelType;                  /* This is written in header only */
-  uint32_t LabelSize;                 /* length of serialized label */
+  int32_t LabelType;                 /* This is written in header only */
+  uint32_t LabelSize;                /* length of serialized label */
   /*
    * The items below this line are stored on 
    * the tape
    */
-  char Id[32];                        /* Bacula Immortal ... */
+  char Id[32];                       /* Bacula Immortal ... */
 
-  uint32_t VerNum;                    /* Label version number */
+  uint32_t VerNum;                   /* Label version number */
 
-  float64_t label_date;               /* Date tape labeled */
-  float64_t label_time;               /* Time tape labeled */
-  float64_t write_date;               /* Date this label written */
-  float64_t write_time;               /* Time this label written */
+  float64_t label_date;              /* Date tape labeled */
+  float64_t label_time;              /* Time tape labeled */
+  float64_t write_date;              /* Date this label written */
+  float64_t write_time;              /* Time this label written */
 
   char VolName[MAX_NAME_LENGTH];      /* Volume name */
   char PrevVolName[MAX_NAME_LENGTH];  /* Previous Volume Name */
@@ -117,9 +119,9 @@ struct Volume_Label {
   char MediaType[MAX_NAME_LENGTH];    /* Type of this media */
 
   char HostName[MAX_NAME_LENGTH];     /* Host name of writing computer */
-  char LabelProg[32];                 /* Label program name */
-  char ProgVersion[32];               /* Program version */
-  char ProgDate[32];                  /* Program build date/time */
+  char LabelProg[32];                /* Label program name */
+  char ProgVersion[32];              /* Program version */
+  char ProgDate[32];                 /* Program build date/time */
 };
 
 #define SER_LENGTH_Volume_Label 1024   /* max serialised length of volume label */
@@ -132,15 +134,15 @@ typedef struct Volume_Label VOLUME_LABEL;
  *  This record is at the beginning and end of each session
  */
 struct Session_Label {
-  char Id[32];                        /* Bacula Immortal ... */
+  char Id[32];                       /* Bacula Immortal ... */
 
-  uint32_t VerNum;                    /* Label version number */
+  uint32_t VerNum;                   /* Label version number */
 
-  uint32_t JobId;                     /* Job id */
-  uint32_t VolumeIndex;               /* Sequence no of volume for this job */
+  uint32_t JobId;                    /* Job id */
+  uint32_t VolumeIndex;              /* Sequence no of volume for this job */
 
-  float64_t write_date;               /* Date this label written */
-  float64_t write_time;               /* Time this label written */
+  float64_t write_date;              /* Date this label written */
+  float64_t write_time;              /* Time this label written */
 
   char PoolName[MAX_NAME_LENGTH];     /* Pool name */
   char PoolType[MAX_NAME_LENGTH];     /* Pool type */
@@ -157,6 +159,6 @@ struct Session_Label {
 };
 typedef struct Session_Label SESSION_LABEL;
 
-#define SERIAL_BUFSIZE  1024          /* volume serialisation buffer size */
+#define SERIAL_BUFSIZE 1024          /* volume serialisation buffer size */
 
 #endif
index 8164dd0491c73bada5dc93c988d361ead4f9a378..9b151b0fd7ad0b5c0df0a5c7d48e7368a703c5cb 100644 (file)
@@ -5,6 +5,8 @@
  * and acts on them. When a request to append data is made,
  * it opens a data channel and accepts data from the
  * File daemon. 
+ *
+ *   Version $Id$
  * 
  */
 /*
index baa0b40f6e3a9884549235a30ed1c14a869dc5e6..7744daff6abcb911423d2b5428e3fdad5c232376 100644 (file)
@@ -1,5 +1,7 @@
 /*
  * Storage daemon specific defines and includes
+ *
+ *  Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
@@ -45,6 +47,6 @@ struct s_shm {
    DEVICE dev[MAX_DEVICES];
 };
 
-extern char errmsg[];                /* general error message */
+extern char errmsg[];               /* general error message */
 
 #endif /* __STORED_H_ */
index 1c97cff4bb5f82c1b90858f276a7501e42e925a0..43e86213b79b684afec068965790a432c275862a 100644 (file)
@@ -2,6 +2,8 @@
  * Configuration file parser for Bacula Storage daemon
  *
  *     Kern Sibbald, March MM
+ *
+ *   Version $Id$
  */
 
 /*
index dcbc81339692983037da57d6c781eb765a7301a8..6c2f94610746e0cad2a65aeb9a10151d45010fbb 100644 (file)
@@ -1,5 +1,7 @@
 /*
  * Resource codes -- they must be sequential for indexing   
+ *
+ *   Version $Id$
  */
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
index a9e51fb515b4a81e58dc8b9c871785ae09a77f6a..3297fe005f53ea709b30f51f26c891759a8fe809 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #define VERSION "1.20"
 #define VSTRING "1"
-#define DATE    "16 May 2002"
-#define LSMDATE "16May02"
+#define DATE    "19 May 2002"
+#define LSMDATE "19May02"
 
 /* Debug flags */
 #define DEBUG 1