diff options
-rwxr-xr-x | ztdiag.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,3 +1,4 @@ +#include <fcntl.h> #include <sys/ioctl.h> #include <stdio.h> #include <stdlib.h> @@ -17,7 +18,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "Usage: ztdiag <channel>\n"); exit(1); } - fd = open("/dev/zap/ctl"); + fd = open("/dev/zap/ctl", O_RDWR); if (fd < 0) { perror("open(/dev/zap/ctl"); exit(1); |