Commit d24095e4 by Stéphane Graber

Fix ABI compatibility

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: 's avatarStéphane Graber <stgraber@ubuntu.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 31a882ef
...@@ -286,17 +286,6 @@ struct lxc_container { ...@@ -286,17 +286,6 @@ struct lxc_container {
bool (*destroy)(struct lxc_container *c); 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. * \brief Save configuaration to a file.
* *
* \param c Container. * \param c Container.
...@@ -718,15 +707,6 @@ struct lxc_container { ...@@ -718,15 +707,6 @@ struct lxc_container {
bool (*snapshot_destroy)(struct lxc_container *c, const char *snapname); 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. * \brief Determine if the caller may control the container.
* *
* \param c Container. * \param c Container.
...@@ -761,6 +741,8 @@ struct lxc_container { ...@@ -761,6 +741,8 @@ struct lxc_container {
*/ */
bool (*remove_device_node)(struct lxc_container *c, const char *src_path, const char *dest_path); 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. * \brief Add specified netdev to the container.
* *
...@@ -804,6 +786,28 @@ struct lxc_container { ...@@ -804,6 +786,28 @@ struct lxc_container {
* *
*/ */
bool (*restore)(struct lxc_container *c, char *directory, bool verbose); 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 */
}; };
/*! /*!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment