Skip to content

Commit

Permalink
tools: move lxc-stop to API symbols only
Browse files Browse the repository at this point in the history
Closes #2073.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 6, 2018
1 parent 9810df0 commit 52d27da
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/lxc/tools/lxc_stop.c
Expand Up @@ -20,18 +20,18 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>

#define _GNU_SOURCE
#include <libgen.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>

#include <lxc/lxccontainer.h>

#include "lxc.h"
#include "log.h"
#include "arguments.h"
#include "commands.h"
#include "utils.h"
#include "tool_utils.h"

#define OPT_NO_LOCK OPT_USAGE + 1
#define OPT_NO_KILL OPT_USAGE + 2
Expand Down Expand Up @@ -113,7 +113,6 @@ int main(int argc, char *argv[])

if (lxc_log_init(&log))
exit(ret);
lxc_log_options_no_override();

/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
Expand Down Expand Up @@ -155,13 +154,6 @@ int main(int argc, char *argv[])
exit(ret);
}

/* shortcut - if locking is bogus, we should be able to kill
* containers at least */
if (my_args.nolock) {
ret = lxc_cmd_stop(my_args.name, my_args.lxcpath[0]);
exit(ret);
}

c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
fprintf(stderr, "Error opening container\n");
Expand Down

0 comments on commit 52d27da

Please sign in to comment.