mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-05 18:05:16 +00:00
If a filter has already been added, actually return EEXIST when trying
at add it again. MFC after: 1 week
This commit is contained in:
parent
fb92ad4af5
commit
7eb5db5179
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201352
@ -867,6 +867,7 @@ kqueue_add_filteropts(int filt, struct filterops *filtops)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = 0;
|
||||
if (filt > 0 || filt + EVFILT_SYSCOUNT < 0) {
|
||||
printf(
|
||||
"trying to add a filterop that is out of range: %d is beyond %d\n",
|
||||
@ -883,7 +884,7 @@ kqueue_add_filteropts(int filt, struct filterops *filtops)
|
||||
}
|
||||
mtx_unlock(&filterops_lock);
|
||||
|
||||
return (0);
|
||||
return (error);
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
x
Reference in New Issue
Block a user