From: Kern Sibbald Date: Sun, 25 Apr 2010 07:20:41 +0000 (+0200) Subject: Put attr.c debug on dbglvl X-Git-Tag: Release-5.0.2~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8af79d5c5d0f6ad2e46693e5fe3f68170c0a4e7a;p=bacula%2Fbacula Put attr.c debug on dbglvl --- diff --git a/bacula/src/lib/attr.c b/bacula/src/lib/attr.c index e2eae5f28c..3c68c0b7d6 100644 --- a/bacula/src/lib/attr.c +++ b/bacula/src/lib/attr.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2003-2007 Free Software Foundation Europe e.V. + Copyright (C) 2003-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -30,7 +30,6 @@ * * Kern Sibbald, June MMIII (code pulled from filed/restore.c and updated) * - * Version $Id$ */ @@ -38,6 +37,8 @@ #include "jcr.h" #include "lib/breg.h" +static const int dbglvl = 150; + ATTR *new_attr(JCR *jcr) { ATTR *attr = (ATTR *)malloc(sizeof(ATTR)); @@ -74,13 +75,13 @@ int unpack_attributes_record(JCR *jcr, int32_t stream, char *rec, ATTR *attr) * */ attr->stream = stream; - Dmsg1(400, "Attr: %s\n", rec); + Dmsg1(dbglvl, "Attr: %s\n", rec); if (sscanf(rec, "%d %d", &attr->file_index, &attr->type) != 2) { Jmsg(jcr, M_FATAL, 0, _("Error scanning attributes: %s\n"), rec); - Dmsg1(100, "\nError scanning attributes. %s\n", rec); + Dmsg1(dbglvl, "\nError scanning attributes. %s\n", rec); return 0; } - Dmsg2(400, "Got Attr: FilInx=%d type=%d\n", attr->file_index, attr->type); + Dmsg2(dbglvl, "Got Attr: FilInx=%d type=%d\n", attr->file_index, attr->type); if (attr->type & AR_DATA_STREAM) { attr->data_stream = 1; } else { @@ -111,7 +112,7 @@ int unpack_attributes_record(JCR *jcr, int32_t stream, char *rec, ATTR *attr) from_base64(&val, p); attr->data_stream = (int32_t)val; } - Dmsg7(400, "unpack_attr FI=%d Type=%d fname=%s attr=%s lname=%s attrEx=%s ds=%d\n", + Dmsg7(dbglvl, "unpack_attr FI=%d Type=%d fname=%s attr=%s lname=%s attrEx=%s ds=%d\n", attr->file_index, attr->type, attr->fname, attr->attr, attr->lname, attr->attrEx, attr->data_stream); *attr->ofname = 0; @@ -245,7 +246,7 @@ void print_ls_output(JCR *jcr, ATTR *attr) if (attr->type == FT_DELETED) { /* TODO: change this to get last seen values */ bsnprintf(buf, sizeof(buf), "---------- - - - - ---------- -------- %s\n", attr->ofname); - Dmsg1(20, "%s", buf); + Dmsg1(dbglvl, "%s", buf); Jmsg(jcr, M_RESTORED, 1, "%s", buf); return; } @@ -278,6 +279,6 @@ void print_ls_output(JCR *jcr, ATTR *attr) } *p++ = '\n'; *p = 0; - Dmsg1(20, "%s", buf); + Dmsg1(dbglvl, "%s", buf); Jmsg(jcr, M_RESTORED, 1, "%s", buf); }