From: Eric Bollengier Date: Fri, 5 Sep 2025 09:15:24 +0000 (+0200) Subject: Fix loggin errors in dbcheck and in filed/restore.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49df8ec4253eb8ad43e5eb5f66d0de094d6d3a2e;p=thirdparty%2Fbacula.git Fix loggin errors in dbcheck and in filed/restore.c https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/issues/2759 Thanks to Hlib Horzhynskyy for the report --- diff --git a/bacula/src/filed/restore.c b/bacula/src/filed/restore.c index b4affa0a4..88f3d38c0 100644 --- a/bacula/src/filed/restore.c +++ b/bacula/src/filed/restore.c @@ -370,14 +370,14 @@ void do_restore(JCR *jcr) rctx.jcr = jcr; /* The following variables keep track of "known unknowns" */ - int non_suppored_data = 0; - int non_suppored_attr = 0; - int non_suppored_rsrc = 0; - int non_suppored_finfo = 0; - int non_suppored_acl = 0; - int non_suppored_progname = 0; - int non_suppored_crypto = 0; - int non_suppored_xattr = 0; + int non_supported_data = 0; + int non_supported_attr = 0; + int non_supported_rsrc = 0; + int non_supported_finfo = 0; + int non_supported_acl = 0; + int non_supported_progname = 0; + int non_supported_crypto = 0; + int non_supported_xattr = 0; sd = jcr->store_bsock; jcr->setJobStatus(JS_Running); @@ -557,7 +557,7 @@ void do_restore(JCR *jcr) if (!is_restore_stream_supported(attr->data_stream)) { Dmsg2(15, "Non-supported data stream %d: %s\n", attr->data_stream, stream_to_ascii(attr->data_stream)); - if (!non_suppored_data++) { + if (!non_supported_data++) { Jmsg(jcr, M_WARNING, 0, _("%s stream not supported on this Client.\n"), stream_to_ascii(attr->data_stream)); } @@ -871,7 +871,7 @@ void do_restore(JCR *jcr) } } } else { - non_suppored_rsrc++; + non_supported_rsrc++; } break; @@ -881,7 +881,7 @@ void do_restore(JCR *jcr) continue; } } else { - non_suppored_finfo++; + non_supported_finfo++; } break; @@ -946,7 +946,7 @@ void do_restore(JCR *jcr) } } } else { - non_suppored_acl++; + non_supported_acl++; } break; @@ -994,7 +994,7 @@ void do_restore(JCR *jcr) } } } else { - non_suppored_xattr++; + non_supported_xattr++; } break; @@ -1015,7 +1015,7 @@ void do_restore(JCR *jcr) goto get_out; } } else { - non_suppored_xattr++; + non_supported_xattr++; } break; @@ -1043,9 +1043,9 @@ void do_restore(JCR *jcr) case STREAM_PROGRAM_NAMES: case STREAM_PROGRAM_DATA: - if (!non_suppored_progname) { + if (!non_supported_progname) { Pmsg0(000, "Got Program Name or Data Stream. Ignored.\n"); - non_suppored_progname++; + non_supported_progname++; } break; @@ -1166,24 +1166,24 @@ ok_out: } #endif - if (non_suppored_data > 1 || non_suppored_attr > 1) { + if (non_supported_data > 1 || non_supported_attr > 1) { Jmsg(jcr, M_WARNING, 0, _("%d non-supported data streams and %d non-supported attrib streams ignored.\n"), - non_suppored_data, non_suppored_attr); + non_supported_data, non_supported_attr); } - if (non_suppored_rsrc) { - Jmsg(jcr, M_INFO, 0, _("%d non-supported resource fork streams ignored.\n"), non_suppored_rsrc); + if (non_supported_rsrc) { + Jmsg(jcr, M_INFO, 0, _("%d non-supported resource fork streams ignored.\n"), non_supported_rsrc); } - if (non_suppored_finfo) { - Jmsg(jcr, M_INFO, 0, _("%d non-supported Finder Info streams ignored.\n"), non_suppored_finfo); + if (non_supported_finfo) { + Jmsg(jcr, M_INFO, 0, _("%d non-supported Finder Info streams ignored.\n"), non_supported_finfo); } - if (non_suppored_acl) { - Jmsg(jcr, M_INFO, 0, _("%d non-supported acl streams ignored.\n"), non_suppored_acl); + if (non_supported_acl) { + Jmsg(jcr, M_INFO, 0, _("%d non-supported acl streams ignored.\n"), non_supported_acl); } - if (non_suppored_crypto) { - Jmsg(jcr, M_INFO, 0, _("%d non-supported crypto streams ignored.\n"), non_suppored_acl); + if (non_supported_crypto) { + Jmsg(jcr, M_INFO, 0, _("%d non-supported crypto streams ignored.\n"), non_supported_crypto); } - if (non_suppored_xattr) { - Jmsg(jcr, M_INFO, 0, _("%d non-supported xattr streams ignored.\n"), non_suppored_xattr); + if (non_supported_xattr) { + Jmsg(jcr, M_INFO, 0, _("%d non-supported xattr streams ignored.\n"), non_supported_xattr); } /* Free Signature & Crypto Data */ diff --git a/bacula/src/tools/dbcheck.c b/bacula/src/tools/dbcheck.c index 58f84e395..3a347420f 100755 --- a/bacula/src/tools/dbcheck.c +++ b/bacula/src/tools/dbcheck.c @@ -888,7 +888,7 @@ static void eliminate_orphaned_meta_records() } } if (fix && lctx2.count > 0) { - printf_tstamp(_("Deleting %lld orphaned MetaEmail records.\n"), lctx1.value); + printf_tstamp(_("Deleting %lld orphaned MetaAttachment records.\n"), lctx2.value); q = "DELETE FROM MetaAttachment WHERE JobId NOT IN (SELECT DISTINCT JobId from Job)"; if (!db_sql_query(db, q, NULL, NULL)) { printf_tstamp("%s\n", db_strerror(db));