mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 13:32:45 +00:00
Use EV_SET() macro to initialize kevent structure.
This commit is contained in:
parent
357c2d78c4
commit
6029e6933c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73231
@ -198,15 +198,13 @@ forward(fp, style, off, sbp)
|
||||
struct timespec ts = { 0, 0 };
|
||||
|
||||
if (Fflag && fileno(fp) != STDIN_FILENO) {
|
||||
ev[n].ident = fileno(fp);
|
||||
ev[n].filter = EVFILT_VNODE;
|
||||
ev[n].flags = EV_ADD | EV_ENABLE | EV_CLEAR;
|
||||
ev[n].fflags = NOTE_DELETE | NOTE_RENAME;
|
||||
EV_SET(&ev[n], fileno(fp), EVFILT_VNODE,
|
||||
EV_ADD | EV_ENABLE | EV_CLEAR,
|
||||
NOTE_DELETE | NOTE_RENAME, 0, 0);
|
||||
n++;
|
||||
}
|
||||
ev[n].ident = fileno(fp);
|
||||
ev[n].filter = EVFILT_READ;
|
||||
ev[n].flags = EV_ADD | EV_ENABLE;
|
||||
EV_SET(&ev[n], fileno(fp), EVFILT_READ,
|
||||
EV_ADD | EV_ENABLE, 0, 0, 0);
|
||||
n++;
|
||||
|
||||
if (kevent(kq, ev, n, NULL, 0, &ts) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user