From 424d18529487fa3be6e2419d7ad2c77a62034a0c Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Sun, 5 Nov 2017 22:19:48 -0500 Subject: [PATCH] pass through an arg --- helloctl/helloctl.c | 13 +++++++++---- mod_hello.c | 5 +++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/helloctl/helloctl.c b/helloctl/helloctl.c index 480c3d4..d464cbb 100644 --- a/helloctl/helloctl.c +++ b/helloctl/helloctl.c @@ -11,16 +11,21 @@ int main(int argc, char ** argv) { int fd = -1; + int ret; + int i; + fd = open(HELLOCTL, O_RDONLY); if (fd < 0) { fprintf(stderr, "Could not open %s\n", HELLOCTL); _exit(1); } - int ret; - if (ret = ioctl(fd, 1, 1) < 0) { - fprintf(stderr, "ioctl failed with: %s\n", strerror(ret)); - goto done; + + for (i=1; i