bogus and unused.
orig_ops = *ops;
if ((*ops & (SEL_RD|SEL_ERR))) {
if ((err = pipe_check(f->filp_ino, READING, 0,
- 1, f->filp_pos, &canwrite, 1)) != SUSPEND && err > 0)
+ 1, f->filp_pos, &canwrite, 1)) != SUSPEND)
r |= SEL_RD;
if (err < 0 && err != SUSPEND)
r |= SEL_ERR;
}
if ((*ops & (SEL_WR|SEL_ERR))) {
if ((err = pipe_check(f->filp_ino, WRITING, 0,
- 1, f->filp_pos, &canwrite, 1)) != SUSPEND &&
- err > 0 && canwrite > 0)
+ 1, f->filp_pos, &canwrite, 1)) != SUSPEND)
r |= SEL_WR;
if (err < 0 && err != SUSPEND)
r |= SEL_ERR;
_PROTOTYPE( int do_unpause, (void) );
_PROTOTYPE( int unpause, (int proc_nr_e) );
_PROTOTYPE( int pipe_check, (struct inode *rip, int rw_flag,
- int oflags, int bytes, off_t position, int *canwrite, int notouch));
+ int oflags, int bytes, off_t position, int *canwrite, int notouch));
_PROTOTYPE( void release, (struct inode *ip, int call_nr, int count) );
_PROTOTYPE( void revive, (int proc_nr, int bytes) );
_PROTOTYPE( void suspend, (int task) );
timer_t timer; /* if expiry > 0 */
} selecttab[MAXSELECTS];
-#define SELFD_FILE 0
-#define SELFD_PIPE 1
-#define SELFD_TTY 2
-#define SELFD_INET 3
-#define SELFD_LOG 4
-#define SEL_FDS 5
FORWARD _PROTOTYPE(int select_reevaluate, (struct filp *fp));
int (*select_request)(struct filp *, int *ops, int block);
int (*select_match)(struct filp *);
int select_major;
-} fdtypes[SEL_FDS] = {
- /* SELFD_FILE */
+} fdtypes[] = {
{ select_request_file, select_match_file, 0 },
- /* SELFD_TTY (also PTY) */
{ select_request_general, NULL, TTY_MAJOR },
- /* SELFD_INET */
{ select_request_general, NULL, INET_MAJOR },
- /* SELFD_PIPE (pipe(2) pipes and FS FIFOs) */
{ select_request_pipe, select_match_pipe, 0 },
- /* SELFD_LOG (/dev/klog) */
{ select_request_general, NULL, LOG_MAJOR },
};
+#define SEL_FDS (sizeof(fdtypes) / sizeof(fdtypes[0]))
/* Open Group:
* "File descriptors associated with regular files shall always select true