]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix ABI compatibility
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 29 May 2015 15:39:25 +0000 (11:39 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 1 Jul 2015 17:40:27 +0000 (13:40 -0400)
Until we bump the SONAME to liblxc2, only symbol additions and struct
member additions are allowed.

Adding struct members in the middle of the struct breaks backward
compatibility.

This commit makes it clear when struct members were added and moves a
few members that were added in the middle of the 1.0 struct to the end
of it.

Note that unfortunately that means we're breaking backward compatibility
between LXC 1.1.0 and the state after this commit, given 1.1 is
reasonably new, this is the least damaging way of fixing the problem.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.h

index a136a434739cf66fa86bc90b5c8d95e3babc686a..d60e19af1488f659436a520621d073b3aebde5ff 100644 (file)
@@ -285,17 +285,6 @@ struct lxc_container {
         */
        bool (*destroy)(struct lxc_container *c);
 
-       /*!
-        * \brief Delete the container and all its snapshots.
-        *
-        * \param c Container.
-        *
-        * \return \c true on success, else \c false.
-        *
-        * \note Container must be stopped.
-        */
-       bool (*destroy_with_snapshots)(struct lxc_container *c);
-
        /*!
         * \brief Save configuaration to a file.
         *
@@ -717,15 +706,6 @@ struct lxc_container {
         */
        bool (*snapshot_destroy)(struct lxc_container *c, const char *snapname);
 
-       /*!
-        * \brief Destroy all the container's snapshot.
-        *
-        * \param c Container.
-        *
-        * \return \c true on success, else \c false.
-        */
-       bool (*snapshot_destroy_all)(struct lxc_container *c);
-
        /*!
         * \brief Determine if the caller may control the container.
         *
@@ -761,6 +741,8 @@ struct lxc_container {
         */
        bool (*remove_device_node)(struct lxc_container *c, const char *src_path, const char *dest_path);
 
+       /* Post LXC-1.0 additions */
+
        /*!
         * \brief Add specified netdev to the container.
         *
@@ -804,6 +786,28 @@ struct lxc_container {
         *
         */
        bool (*restore)(struct lxc_container *c, char *directory, bool verbose);
+
+       /*!
+        * \brief Delete the container and all its snapshots.
+        *
+        * \param c Container.
+        *
+        * \return \c true on success, else \c false.
+        *
+        * \note Container must be stopped.
+        */
+       bool (*destroy_with_snapshots)(struct lxc_container *c);
+
+       /*!
+        * \brief Destroy all the container's snapshot.
+        *
+        * \param c Container.
+        *
+        * \return \c true on success, else \c false.
+        */
+       bool (*snapshot_destroy_all)(struct lxc_container *c);
+
+       /* Post LXC-1.1 additions */
 };
 
 /*!