|
From: Jiri J. <jja...@re...> - 2014-09-23 10:09:02
|
Signed-off-by: Jiri Jaburek <jja...@re...> --- audit-test/utils/bin/Makefile | 2 -- audit-test/utils/bin/do_loop.c | 50 ------------------------------------ audit-test/utils/bin/do_loop_clear.c | 43 ------------------------------- 3 files changed, 95 deletions(-) delete mode 100644 audit-test/utils/bin/do_loop.c delete mode 100644 audit-test/utils/bin/do_loop_clear.c diff --git a/audit-test/utils/bin/Makefile b/audit-test/utils/bin/Makefile index 0cc04c9..bbead88 100644 --- a/audit-test/utils/bin/Makefile +++ b/audit-test/utils/bin/Makefile @@ -134,8 +134,6 @@ ALL_EXE = $(CAPS_EXE) \ do_linkat \ do_listxattr \ do_llistxattr \ - do_loop \ - do_loop_clear \ do_lremovexattr \ do_lsetxattr \ do_mount \ diff --git a/audit-test/utils/bin/do_loop.c b/audit-test/utils/bin/do_loop.c deleted file mode 100644 index b7bdb8a..0000000 --- a/audit-test/utils/bin/do_loop.c +++ /dev/null @@ -1,50 +0,0 @@ -/* (c) Copyright Hewlett-Packard Development Company, L.P., 2007 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of version 2 the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "includes.h" -#include <linux/loop.h> -#include <sys/ioctl.h> - -int main(int argc, char **argv) -{ - int fd, loop_fd; - - if (argc != 3) { - fprintf(stderr, "Usage:\n%s <file> <loop device>\n", argv[0]); - return TEST_ERROR; - } - - fd = open(argv[1], O_RDWR); - if (fd == -1) { - perror("do_loop: open fd"); - return TEST_ERROR; - } - - loop_fd = open(argv[2], O_RDWR); - if (loop_fd == -1) { - perror("do_loop: open loop_fd"); - return TEST_ERROR; - } - - if (ioctl(loop_fd, LOOP_SET_FD, fd) == -1) { - perror("do_loop: ioctl loop_set_fd"); - return TEST_ERROR; - } - - close(fd); - close(loop_fd); - - return 0; -} diff --git a/audit-test/utils/bin/do_loop_clear.c b/audit-test/utils/bin/do_loop_clear.c deleted file mode 100644 index 1b783c4..0000000 --- a/audit-test/utils/bin/do_loop_clear.c +++ /dev/null @@ -1,43 +0,0 @@ -/* (c) Copyright Hewlett-Packard Development Company, L.P., 2007 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of version 2 the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "includes.h" -#include <linux/loop.h> -#include <sys/ioctl.h> - -int main(int argc, char **argv) -{ - int loop_fd; - - if (argc != 2) { - fprintf(stderr, "Usage:\n%s <loop device>\n", argv[0]); - return TEST_ERROR; - } - - loop_fd = open(argv[1], O_RDWR); - if (loop_fd == -1) { - perror("do_loop: open loop_fd"); - return TEST_ERROR; - } - - if (ioctl(loop_fd, LOOP_CLR_FD) == -1) { - perror("do_loop: ioctl loop_clr_fd"); - return TEST_ERROR; - } - - close(loop_fd); - - return 0; -} -- 1.8.3.1 |