Skip to content

Commit

Permalink
Fix ABI compatibility
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stgraber committed Jun 2, 2015
1 parent 31a882e commit d24095e
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions src/lxc/lxccontainer.h
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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 */
};

/*!
Expand Down

0 comments on commit d24095e

Please sign in to comment.