aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fifo.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fifo.c')
-rw-r--r--fs/fifo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/fifo.c b/fs/fifo.c
index 987bf9411495..f8f97b8b6d44 100644
--- a/fs/fifo.c
+++ b/fs/fifo.c
@@ -51,7 +51,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
51 filp->f_mode &= (FMODE_READ | FMODE_WRITE); 51 filp->f_mode &= (FMODE_READ | FMODE_WRITE);
52 52
53 switch (filp->f_mode) { 53 switch (filp->f_mode) {
54 case 1: 54 case FMODE_READ:
55 /* 55 /*
56 * O_RDONLY 56 * O_RDONLY
57 * POSIX.1 says that O_NONBLOCK means return with the FIFO 57 * POSIX.1 says that O_NONBLOCK means return with the FIFO
@@ -76,7 +76,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
76 } 76 }
77 break; 77 break;
78 78
79 case 2: 79 case FMODE_WRITE:
80 /* 80 /*
81 * O_WRONLY 81 * O_WRONLY
82 * POSIX.1 says that O_NONBLOCK means return -1 with 82 * POSIX.1 says that O_NONBLOCK means return -1 with
@@ -98,7 +98,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
98 } 98 }
99 break; 99 break;
100 100
101 case 3: 101 case FMODE_READ | FMODE_WRITE:
102 /* 102 /*
103 * O_RDWR 103 * O_RDWR
104 * POSIX.1 leaves this case "undefined" when O_NONBLOCK is set. 104 * POSIX.1 leaves this case "undefined" when O_NONBLOCK is set.