]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Simplify overlay.{c,h}
authorChristian Brauner <christian.brauner@mailbox.org>
Thu, 17 Dec 2015 23:26:14 +0000 (00:26 +0100)
committerChristian Brauner <christian.brauner@mailbox.org>
Mon, 28 Dec 2015 08:50:04 +0000 (09:50 +0100)
The struct

struct ovl_rsync_data {
struct bdev *orig;
struct bdev *new;
};

is simply a duplicate of

struct rsync_data {
struct bdev *orig;
struct bdev *new;
};

So let's replace any references to ovl_rsync_data with rsync_data.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
src/lxc/bdev/bdev.c
src/lxc/bdev/lxcoverlay.c
src/lxc/bdev/lxcrsync.c

index bc6e14a250fb1098b80592e0a35674d0c67e0125..ec0856ec92e3a142904b53a8f0076216f10999c7 100644 (file)
@@ -48,8 +48,8 @@
 #include <sys/wait.h>
 
 #include "bdev.h"
-#include "config.h"
 #include "conf.h"
+#include "config.h"
 #include "error.h"
 #include "log.h"
 #include "lxc.h"
index 4cdad8ac702e5daf304f52b22e048ea2a9b51082..fa4ea5c0f2c291d5fffa945bc13b6b35965404cc 100644 (file)
 #include "log.h"
 #include "lxccontainer.h"
 #include "lxcoverlay.h"
+#include "lxcrsync.h"
 #include "utils.h"
 
 lxc_log_define(overlay, lxc);
 
 static char *ovl_name;
 
-struct ovl_rsync_data {
-       struct bdev *orig;
-       struct bdev *new;
-};
-
-/* defined in lxccontainer.c: needs to become common helper */
-extern int do_rsync(const char *src, const char *dest);
-
 /* defined in lxccontainer.c: needs to become common helper */
 extern char *dir_new_path(char *src, const char *oldname, const char *name,
                          const char *oldpath, const char *lxcpath);
 
 static char *ovl_detect_name(void);
-static int ovl_do_rsync(struct bdev *orig, struct bdev *new, struct lxc_conf *conf);
-static int ovl_rsync(struct ovl_rsync_data *data);
+static int ovl_do_rsync(struct bdev *orig, struct bdev *new,
+                       struct lxc_conf *conf);
+static int ovl_rsync(struct rsync_data *data);
 static int ovl_rsync_wrapper(void *data);
 
 int ovl_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
@@ -631,7 +625,7 @@ err:
        return fret;
 }
 
-static int ovl_rsync(struct ovl_rsync_data *data)
+static int ovl_rsync(struct rsync_data *data)
 {
        int ret;
 
@@ -701,7 +695,7 @@ static char *ovl_detect_name(void)
 static int ovl_do_rsync(struct bdev *orig, struct bdev *new, struct lxc_conf *conf)
 {
        int ret = -1;
-       struct ovl_rsync_data rdata;
+       struct rsync_data rdata;
 
        rdata.orig = orig;
        rdata.new = new;
@@ -717,7 +711,7 @@ static int ovl_do_rsync(struct bdev *orig, struct bdev *new, struct lxc_conf *co
 
 static int ovl_rsync_wrapper(void *data)
 {
-       struct ovl_rsync_data *arg = data;
+       struct rsync_data *arg = data;
        return ovl_rsync(arg);
 }
 
index 67fc702ae1e3d3ff59f9ee41cdd63a70b3a3bad6..17f0b6ece9a1b1b162e4df24782367c837cc07f6 100644 (file)
@@ -34,7 +34,6 @@
 
 #include "bdev.h"
 #include "log.h"
-#include "lxcbtrfs.h"
 #include "lxcrsync.h"
 #include "utils.h"