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