From: Radosław Korzeniewski Date: Wed, 15 Jan 2020 10:38:33 +0000 (+0100) Subject: Update pluglib. X-Git-Tag: Release-9.6.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa5a2df5ed268c88868d3296334b7e4da3bee63b;p=thirdparty%2Fbacula.git Update pluglib. --- 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_ */