From: Kern Sibbald Date: Mon, 18 Jan 2010 08:28:18 +0000 (+0100) Subject: Make Attr/record FI non-fatal if different -- possibly temp + add new session record... X-Git-Tag: Release-7.0.0~2386 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6c8df4780e5f37b39a0e681e54d839eebbf8ec75;p=bacula%2Fbacula Make Attr/record FI non-fatal if different -- possibly temp + add new session record types --- diff --git a/bacula/src/stored/bls.c b/bacula/src/stored/bls.c index c7158c9b6b..0526c52128 100644 --- a/bacula/src/stored/bls.c +++ b/bacula/src/stored/bls.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2009 Free Software Foundation Europe e.V. + Copyright (C) 2000-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. @@ -386,13 +386,15 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec) if (!unpack_attributes_record(jcr, rec->Stream, rec->data, attr)) { if (!forge_on) { Emsg0(M_ERROR_TERM, 0, _("Cannot continue.\n")); + } else { + Emsg0(M_ERROR, 0, _("Attrib unpack error!\n")); } num_files++; return true; } if (attr->file_index != rec->FileIndex) { - Emsg2(forge_on?M_WARNING:M_ERROR_TERM, 0, _("Record header file index %ld not equal record index %ld\n"), + Emsg2(M_ERROR, 0, _("Record FileIndex %ld not equal Attrib FileIndex %ld\n"), rec->FileIndex, attr->file_index); } @@ -442,8 +444,18 @@ static void get_session_record(DEVICE *dev, DEV_RECORD *rec, SESSION_LABEL *sess case EOM_LABEL: rtype = _("End of Medium"); break; + case EOT_LABEL: + rtype = _("End of Physical Medium"); + break; + case SOB_LABEL: + rtype = _("Start of object"); + break; + case EOB_LABEL: + rtype = _("End of object"); + break; default: rtype = _("Unknown"); + Dmsg1(10, "FI rtype=%d unknown\n", rec->FileIndex); break; } Dmsg5(10, "%s Record: VolSessionId=%d VolSessionTime=%d JobId=%d DataLen=%d\n", diff --git a/bacula/src/stored/record.c b/bacula/src/stored/record.c index c1582aa5c2..2fcdd22b00 100644 --- a/bacula/src/stored/record.c +++ b/bacula/src/stored/record.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2001-2008 Free Software Foundation Europe e.V. + Copyright (C) 2001-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. @@ -67,6 +67,12 @@ const char *FI_to_ascii(char *buf, int fi) case EOT_LABEL: return "EOT_LABEL"; break; + case SOB_LABEL: + return "SOB_LABEL"; + break; + case EOB_LABEL: + return "EOB_LABEL"; + break; default: sprintf(buf, _("unknown: %d"), fi); return buf;