]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Allow plugins to update plugin-specific files attributes
authorMichal Rakowski <michal.rakowski@baculasystems.com>
Mon, 20 Dec 2021 17:56:47 +0000 (18:56 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:57 +0000 (13:56 +0200)
bacula/src/filed/fd_plugins.c
bacula/src/filed/fd_plugins.h

index 7682bfa1980539d24db860c3318a2cf89c69cd2b..9fef5fb936040f7f235e23fca7ab72daaa4df40d 100644 (file)
@@ -680,6 +680,10 @@ int plugin_save(JCR *jcr, FF_PKT *ff_pkt, bool top_level)
          if (plug_func(plugin)->startBackupFile(jcr->plugin_ctx, &sp) != bRC_OK) {
             goto bail_out;
          }
+
+         /* Set the flag if the plugin wants to update file's attributues */
+         ff_pkt->stat_update = sp.stat_update;
+
          if (sp.type == 0) {
             Jmsg1(jcr, M_FATAL, 0, _("Command plugin \"%s\": no type in startBackupFile packet.\n"),
                cmd);
index e27e1fdff527ede38323610b248409bf8dd69bee..23e1362c180057b69c449f9a149915c0770ac20b 100644 (file)
@@ -298,6 +298,7 @@ struct save_pkt {
    bool portable;                     /* set if data format is portable */
    bool accurate_found;               /* Found in accurate list (valid after check_changes()) */
    bool do_dedup;                     /* True if we deal with a dedup storage system */
+   bool stat_update;                  /* True if only file's metada needds to be updated */
    char *cmd;                         /* command */
    struct restore_object restore_obj; /* Info about restore object */
    struct plugin_object plugin_obj;   /* Plugin Object */