From 3e8d5ad4ecff0573d959de1724290dc9fdfc2fc2 Mon Sep 17 00:00:00 2001 From: James Harper Date: Sun, 18 Apr 2010 08:36:48 +0200 Subject: [PATCH] Add bVarWorkingDir to filed plugins --- bacula/src/filed/fd_plugins.c | 5 +++++ bacula/src/filed/fd_plugins.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index 4d7abba263..65ec96b67a 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -34,6 +34,8 @@ #include "bacula.h" #include "filed.h" +extern CLIENT *me; + const int dbglvl = 150; #ifdef HAVE_WIN32 const char *plugin_type = "-fd.dll"; @@ -954,6 +956,9 @@ static bRC baculaGetValue(bpContext *ctx, bVariable var, void *value) } #endif return bRC_Error; + case bVarWorkingDir: + *(void **)value = me->working_directory; + break; } return bRC_OK; } diff --git a/bacula/src/filed/fd_plugins.h b/bacula/src/filed/fd_plugins.h index adf82df4c5..cbfe199e80 100644 --- a/bacula/src/filed/fd_plugins.h +++ b/bacula/src/filed/fd_plugins.h @@ -172,7 +172,8 @@ typedef enum { bVarAccurate = 9, bVarFileSeen = 10, bVarVssObject = 11, - bVarVssDllHandle = 12 + bVarVssDllHandle = 12, + bVarWorkingDir = 13 } bVariable; /* Events that are passed to plugin */ -- 2.39.5