]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests: clenaup may_control.c
author2xsec <dh48.jeong@samsung.com>
Tue, 3 Jul 2018 09:22:48 +0000 (18:22 +0900)
committer2xsec <dh48.jeong@samsung.com>
Tue, 3 Jul 2018 09:22:48 +0000 (18:22 +0900)
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
src/tests/may_control.c

index bb7000caacd284b60056f3392c18961a42414f9f..2930deb2ad9687b1f3b5080cf8a6be81b065f12a 100644 (file)
@@ -35,12 +35,16 @@ int main(int argc, char *argv[])
 
        if (argc < 2)
                usage(argv[0]);
+
        name = argv[1];
+
        if (argc == 3)
                lxcpath = argv[2];
+
        c = lxc_container_new(name, lxcpath);
        if (c)
                may = c->may_control(c);
+
        printf("You may%s control %s\n", may ? "" : " not", name);
        exit(may ? 0 : 1);
 }