]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix loggin errors in dbcheck and in filed/restore.c
authorEric Bollengier <eric@baculasystems.com>
Fri, 5 Sep 2025 09:15:24 +0000 (11:15 +0200)
committerEric Bollengier <eric@baculasystems.com>
Fri, 5 Sep 2025 09:15:26 +0000 (11:15 +0200)
https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/issues/2759

Thanks to Hlib Horzhynskyy for the report

bacula/src/filed/restore.c
bacula/src/tools/dbcheck.c

index b4affa0a44cb11c76074a46a35b45a19a7b46839..88f3d38c0118b8892cafb130a1096c4e5b126c76 100644 (file)
@@ -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 */
index 58f84e395a9520b4c03c3cd1e144c0f90d50a558..3a347420f060171512ce1315ca96824aa2a3a5a5 100755 (executable)
@@ -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));