]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Update pluglib.
authorRadosław Korzeniewski <radekk@inteos.pl>
Wed, 15 Jan 2020 10:38:33 +0000 (11:38 +0100)
committerRadosław Korzeniewski <radekk@inteos.pl>
Wed, 15 Jan 2020 10:38:33 +0000 (11:38 +0100)
bacula/src/plugins/fd/pluglib.c
bacula/src/plugins/fd/pluglib.h

index 13410092536baee29db6d8232b0911fa9c9440eb..cac825f3d69cfe2bf7c86b7035f5f5fe53d2b6e4 100644 (file)
@@ -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.
index 33a7d3f77c01d49c22f7fb5ccc607a2ffad40879..61553ec775ca6373ec005b9239b624b6de42b0a8 100644 (file)
@@ -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_ */