From 02da25e00bcd56202de808693be148ead163e078 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 4 Mar 2004 11:23:21 +0000 Subject: [PATCH] Update configure to set x on logrotate git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1111 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/configure.in | 2 +- bacula/configure | 2 +- bacula/kernstodo | 8 ++++- bacula/src/dird/jobq.c | 2 +- bacula/src/dird/scheduler.c | 10 ++++-- bacula/src/filed/job.c | 2 +- bacula/src/lib/dlist.c | 68 ++++++++++++++++++------------------ bacula/src/stored/dircmd.c | 2 +- 8 files changed, 54 insertions(+), 42 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index f05a777f0c..f3328a5bb2 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1604,7 +1604,7 @@ AC_OUTPUT([autoconf/Make.common \ cd scripts chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer -chmod 755 bconsole gconsole mtx-changer devel_bacula +chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate cd .. c=src/cats diff --git a/bacula/configure b/bacula/configure index bdc681a0bb..9ead700267 100755 --- a/bacula/configure +++ b/bacula/configure @@ -19415,7 +19415,7 @@ fi cd scripts chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer -chmod 755 bconsole gconsole mtx-changer devel_bacula +chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate cd .. c=src/cats diff --git a/bacula/kernstodo b/bacula/kernstodo index f89cb4c4a0..5bc288d7c1 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -68,8 +68,15 @@ For 1.33 Testing/Documentation: "soft" and "intr"remount options may well help you. The only way of being sure would be totry it.See, for example, http://howtos.linux.com/guides/nag2/x-087-2-nfs.mountd.shtml +- Add the following devices as working: + Adic Scalar 100 DLT + Adic Fastor 22 DLT + (both HVD) + Overland LoaderXpress LTO (LVD) + Overland Neo2000 (LVD) For 1.33 +- Use SHA1 on authentication if possible. - Check: Run = Level=Differential feb-dec 1 at 1:05 to see if wday is empty. - Look at installation file permissions with Scott so that make install and the rpms agree. @@ -1395,4 +1402,3 @@ Block Position: 0 - Make column listing for running jobs JobId Level Type Started Name Status - Why does Bacula need the drive open to do "autochanger list" ? - Add data compare on write/read in btape "test". - diff --git a/bacula/src/dird/jobq.c b/bacula/src/dird/jobq.c index abd65e2482..c552aa781a 100755 --- a/bacula/src/dird/jobq.c +++ b/bacula/src/dird/jobq.c @@ -203,7 +203,7 @@ int jobq_add(jobq_t *jq, JCR *jcr) pthread_t id; wait_pkt *sched_pkt; - Dmsg3(000, "jobq_add jobid=%d jcr=0x%x use_count=%d\n", jcr->JobId, jcr, jcr->use_count); + Dmsg3(010, "jobq_add jobid=%d jcr=0x%x use_count=%d\n", jcr->JobId, jcr, jcr->use_count); if (jq->valid != JOBQ_VALID) { Jmsg0(jcr, M_ERROR, 0, "Jobq_add queue not initialized.\n"); return EINVAL; diff --git a/bacula/src/dird/scheduler.c b/bacula/src/dird/scheduler.c index 2d5cd58158..ef6f7b7b5d 100644 --- a/bacula/src/dird/scheduler.c +++ b/bacula/src/dird/scheduler.c @@ -32,7 +32,7 @@ #include "bacula.h" #include "dird.h" -#define PHIL +/* #define PHIL */ /* Local variables */ @@ -317,8 +317,9 @@ static void add_job(JOB *job, RUN *run, time_t now, time_t runtime) bstrftime_nc(dt, sizeof(dt), runtime); bstrftime_nc(dt1, sizeof(dt1), run->last_run); bstrftime_nc(dt2, sizeof(dt2), now); - Dmsg4(000, "Drop: Job=%s run=%s. last_run=%s. now=%s\n", job->hdr.name, + Dmsg4(000, "Drop: Job=\"%s\" run=%s. last_run=%s. now=%s\n", job->hdr.name, dt, dt1, dt2); + fflush(stdout); #endif return; } @@ -348,6 +349,10 @@ static void add_job(JOB *job, RUN *run, time_t now, time_t runtime) jobs_to_run->append(je); dump_job(je, "Appended job"); } + foreach_dlist(ji, jobs_to_run) { + dump_job(ji, "Run queue"); + } + Dmsg0(000, "End run queue\n"); } static void dump_job(job_item *ji, char *msg) @@ -362,6 +367,7 @@ static void dump_job(job_item *ji, char *msg) bstrftime_nc(dt, sizeof(dt), ji->runtime); Dmsg4(200, "%s: Job=%s priority=%d run %s\n", msg, ji->job->hdr.name, ji->Priority, dt); + fflush(stdout); debug_level = save_debug; #endif } diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 33238d6cd9..458e3a5a8b 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -284,7 +284,7 @@ static int setdebug_cmd(JCR *jcr) int level, trace_flag; Dmsg1(110, "setdebug_cmd: %s", dir->msg); - if (sscanf(dir->msg, "setdebug=%d", &level, &trace_flag) != 2 || level < 0) { + if (sscanf(dir->msg, "setdebug=%d trace=%d", &level, &trace_flag) != 2 || level < 0) { pm_strcpy(&jcr->errmsg, dir->msg); bnet_fsend(dir, "2991 Bad setdebug command: %s\n", jcr->errmsg); return 0; diff --git a/bacula/src/lib/dlist.c b/bacula/src/lib/dlist.c index 95de52a1d3..9dd304e2f2 100644 --- a/bacula/src/lib/dlist.c +++ b/bacula/src/lib/dlist.c @@ -1,9 +1,9 @@ /* - * Bacula doubly linked list routines. + * Bacula doubly linked list routines. * * dlist is a doubly linked list with the links being in the - * list data item. - * + * list data item. + * * Kern Sibbald, July MMIII * * Version $Id$ @@ -39,14 +39,14 @@ */ void dlist::append(void *item) { - ((dlink *)((char *)item+loffset))->next = NULL; - ((dlink *)((char *)item+loffset))->prev = tail; + ((dlink *)(((char *)item)+loffset))->next = NULL; + ((dlink *)(((char *)item)+loffset))->prev = tail; if (tail) { - ((dlink *)((char *)tail+loffset))->next = item; + ((dlink *)(((char *)tail)+loffset))->next = item; } tail = item; - if (head == NULL) { /* if empty list, */ - head = item; /* item is head as well */ + if (head == NULL) { /* if empty list, */ + head = item; /* item is head as well */ } num_items++; } @@ -56,46 +56,46 @@ void dlist::append(void *item) */ void dlist::prepend(void *item) { - ((dlink *)((char *)item+loffset))->next = head; - ((dlink *)((char *)item+loffset))->prev = NULL; + ((dlink *)(((char *)item)+loffset))->next = head; + ((dlink *)(((char *)item)+loffset))->prev = NULL; if (head) { - ((dlink *)((char *)head+loffset))->prev = item; + ((dlink *)(((char *)head)+loffset))->prev = item; } head = item; - if (tail == NULL) { /* if empty list, */ - tail = item; /* item is tail too */ + if (tail == NULL) { /* if empty list, */ + tail = item; /* item is tail too */ } num_items++; } -void dlist::insert_before(void *item, void *where) +void dlist::insert_before(void *item, void *where) { dlink *where_link = (dlink *)((char *)where+loffset); - ((dlink *)((char *)item+loffset))->next = where; - ((dlink *)((char *)item+loffset))->prev = where_link->prev; + ((dlink *)(((char *)item)+loffset))->next = where; + ((dlink *)(((char *)item)+loffset))->prev = where_link->prev; if (where_link->prev) { - ((dlink *)((char *)(where_link->prev)+loffset))->next = item; - where_link->prev = item; + ((dlink *)(((char *)(where_link->prev))+loffset))->next = item; } + where_link->prev = item; if (head == where) { head = item; } num_items++; } -void dlist::insert_after(void *item, void *where) +void dlist::insert_after(void *item, void *where) { dlink *where_link = (dlink *)((char *)where+loffset); - ((dlink *)((char *)item+loffset))->next = where_link->next; - ((dlink *)((char *)item+loffset))->prev = where; + ((dlink *)(((char *)item)+loffset))->next = where_link->next; + ((dlink *)(((char *)item)+loffset))->prev = where; if (where_link->next) { - ((dlink *)((char *)(where_link->next)+loffset))->prev = item; - where_link->next = item; + ((dlink *)(((char *)(where_link->next))+loffset))->prev = item; } + where_link->next = item; if (tail == where) { tail = item; } @@ -106,25 +106,25 @@ void dlist::insert_after(void *item, void *where) void dlist::remove(void *item) { void *xitem; - dlink *ilink = (dlink *)((char *)item+loffset); /* item's link */ + dlink *ilink = (dlink *)(((char *)item)+loffset); /* item's link */ if (item == head) { head = ilink->next; if (head) { - ((dlink *)((char *)head+loffset))->prev = NULL; + ((dlink *)(((char *)head)+loffset))->prev = NULL; } if (item == tail) { - tail = ilink->prev; + tail = ilink->prev; } } else if (item == tail) { tail = ilink->prev; if (tail) { - ((dlink *)((char *)tail+loffset))->next = NULL; + ((dlink *)(((char *)tail)+loffset))->next = NULL; } } else { xitem = ilink->next; - ((dlink *)((char *)xitem+loffset))->prev = ilink->prev; + ((dlink *)(((char *)xitem)+loffset))->prev = ilink->prev; xitem = ilink->prev; - ((dlink *)((char *)xitem+loffset))->next = ilink->next; + ((dlink *)(((char *)xitem)+loffset))->next = ilink->next; } num_items--; } @@ -134,7 +134,7 @@ void * dlist::next(void *item) if (item == NULL) { return head; } - return ((dlink *)((char *)item+loffset))->next; + return ((dlink *)(((char *)item)+loffset))->next; } void * dlist::prev(void *item) @@ -142,7 +142,7 @@ void * dlist::prev(void *item) if (item == NULL) { return tail; } - return ((dlink *)((char *)item+loffset))->prev; + return ((dlink *)(((char *)item)+loffset))->prev; } @@ -150,7 +150,7 @@ void * dlist::prev(void *item) void dlist::destroy() { for (void *n=head; n; ) { - void *ni = ((dlink *)((char *)n+loffset))->next; + void *ni = ((dlink *)(((char *)n)+loffset))->next; free(n); n = ni; } @@ -184,7 +184,7 @@ int main() jcr->buf = bstrdup(buf); jcr_chain->prepend(jcr); if (i == 10) { - save_jcr = jcr; + save_jcr = jcr; } } @@ -213,7 +213,7 @@ int main() jcr->buf = bstrdup(buf); jcr_chain->append(jcr); if (i == 10) { - save_jcr = jcr; + save_jcr = jcr; } } diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 9dc0abec61..f0b891e95b 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -201,7 +201,7 @@ static int setdebug_cmd(JCR *jcr) int level, trace_flag; Dmsg1(10, "setdebug_cmd: %s", dir->msg); - if (sscanf(dir->msg, "setdebug=%d", &level, &trace_flag) != 2 || level < 0) { + if (sscanf(dir->msg, "setdebug=%d trace=%d", &level, &trace_flag) != 2 || level < 0) { bnet_fsend(dir, "3991 Bad setdebug command: %s\n", dir->msg); return 0; } -- 2.39.2