Skip to content

Commit

Permalink
filed: remove support for bVarDistName
Browse files Browse the repository at this point in the history
The plugin interface allowed to query the platform, distribution and
version of the filedaemon using bVarDistName. This has not been used by
any plugin and the provided value was of questionable quality.
This patch removes support for bVarDistName. Querying it will now raise
an error. The related dist_name from message.cc that was used solely for
this purpose has also been removed.
  • Loading branch information
arogge committed May 25, 2020
1 parent 5b5aa28 commit fc7a7f3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
5 changes: 2 additions & 3 deletions core/src/filed/fd_plugins.cc
Expand Up @@ -61,7 +61,6 @@ extern boffset_t (*plugin_blseek)(BareosWinFilePacket* bfd,
int whence);

extern char* exepath;
extern char* dist_name;

namespace filedaemon {

Expand Down Expand Up @@ -2077,8 +2076,8 @@ static bRC bareosGetValue(bpContext* ctx, bVariable var, void* value)
*(const char**)value = kBareosVersionStrings.FullWithDate;
break;
case bVarDistName:
*(char**)value = dist_name;
break;
/* removed, as this value was never used by any plugin */
return bRC_Error;
default:
if (!ctx) { /* Other variables need context */
return bRC_Error;
Expand Down
1 change: 0 additions & 1 deletion core/src/lib/message.cc
Expand Up @@ -53,7 +53,6 @@ int debug_level = 0; /* debug level */
bool dbg_timestamp = false; /* print timestamp in debug output */
bool prt_kaboom = false; /* Print kaboom output */
utime_t daemon_start_time = 0; /* Daemon start time */
const char* dist_name = PLATFORM " " DISTVER;
char my_name[128] = {0}; /* daemon name is stored here */
char host_name[256] = {0}; /* host machine name */
char* exepath = (char*)NULL;
Expand Down
1 change: 0 additions & 1 deletion core/src/tests/test_fd_plugins.cc
Expand Up @@ -70,7 +70,6 @@ extern boffset_t (*plugin_blseek)(BareosWinFilePacket* bfd,

extern char* exepath;
extern char* version;
extern char* dist_name;

namespace filedaemon {

Expand Down

0 comments on commit fc7a7f3

Please sign in to comment.