summaryrefslogtreecommitdiffstats
path: root/kdmlib
diff options
context:
space:
mode:
Diffstat (limited to 'kdmlib')
-rw-r--r--kdmlib/kdmtsak.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kdmlib/kdmtsak.cpp b/kdmlib/kdmtsak.cpp
index ebfedb261..cb3c5b3b2 100644
--- a/kdmlib/kdmtsak.cpp
+++ b/kdmlib/kdmtsak.cpp
@@ -138,14 +138,14 @@ int main (int argc, char *argv[])
if (verifier_result == 0) {
// OK, the calling process is authorized to retrieve SAK data
// First, flush the buffer
- mPipe_fd = open(FIFO_FILE, O_RDWR | O_NONBLOCK);
+ mPipe_fd = open(FIFO_FILE, O_RDONLY | O_NONBLOCK);
numread = 1;
while (numread > 0) {
numread = read(mPipe_fd, readbuf, 6);
}
close(mPipe_fd);
// Now wait for SAK press
- mPipe_fd = open(FIFO_FILE, O_RDWR);
+ mPipe_fd = open(FIFO_FILE, O_RDONLY);
while (mPipe_fd > -1) {
numread = read(mPipe_fd, readbuf, 6);
readbuf[numread] = 0;
@@ -158,13 +158,13 @@ int main (int argc, char *argv[])
else {
usleep(100);
// Flush the buffer
- mPipe_fd = open(FIFO_FILE, O_RDWR | O_NONBLOCK);
+ mPipe_fd = open(FIFO_FILE, O_RDONLY | O_NONBLOCK);
numread = 1;
while (numread > 0) {
numread = read(mPipe_fd, readbuf, 6);
}
close(mPipe_fd);
- mPipe_fd = open(FIFO_FILE, O_RDWR);
+ mPipe_fd = open(FIFO_FILE, O_RDONLY);
}
}
else {