From fa5a2df5ed268c88868d3296334b7e4da3bee63b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rados=C5=82aw=20Korzeniewski?= Date: Wed, 15 Jan 2020 11:38:33 +0100 Subject: [PATCH] Update pluglib. --- bacula/src/plugins/fd/pluglib.c | 19 ------------------- bacula/src/plugins/fd/pluglib.h | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/bacula/src/plugins/fd/pluglib.c b/bacula/src/plugins/fd/pluglib.c index 134100925..cac825f3d 100644 --- a/bacula/src/plugins/fd/pluglib.c +++ b/bacula/src/plugins/fd/pluglib.c @@ -182,25 +182,6 @@ uint64_t pluglib_size_suffix(double disksize, char suff) return size; } -/* - * Checks if plugin command points to our Plugin - * - * in: - * command - the plugin command used for backup/restore - * out: - * True - if it is our plugin command - * False - the other plugin command - */ -bool isourplugincommand(const char *pluginprefix, const char *command) -{ - /* check if it is our Plugin command */ - if (strncmp(pluginprefix, command, strlen(pluginprefix)) == 0){ - /* it is not our plugin prefix */ - return true; - } - return false; -} - /* * Creates a path hierarchy on local FS. * It is used for local restore mode to create a required directory. diff --git a/bacula/src/plugins/fd/pluglib.h b/bacula/src/plugins/fd/pluglib.h index 33a7d3f77..61553ec77 100644 --- a/bacula/src/plugins/fd/pluglib.h +++ b/bacula/src/plugins/fd/pluglib.h @@ -108,7 +108,25 @@ extern bInfo *binfo; const char *eventtype2str(bEvent *event); uint64_t pluglib_size_suffix(int disksize, char suff); uint64_t pluglib_size_suffix(double disksize, char suff); -bool isourplugincommand(const char *pluginprefix, const char *command); bRC pluglib_mkpath(bpContext* ctx, char* path, bool isfatal); +/* + * Checks if plugin command points to our Plugin + * + * in: + * command - the plugin command used for backup/restore + * out: + * True - if it is our plugin command + * False - the other plugin command + */ +inline bool isourplugincommand(const char *pluginprefix, const char *command) +{ + /* check if it is our Plugin command */ + if (strncmp(pluginprefix, command, strlen(pluginprefix)) == 0){ + /* it is not our plugin prefix */ + return true; + } + return false; +} + #endif /* _PLUGLIB_H_ */ -- 2.47.3