mirror of https://github.com/F-Stack/f-stack.git
FreeBSD misc: add a macro to turn on NETGRAPH option and return error when call sleep
This commit is contained in:
parent
c36e692a8e
commit
a416aa0841
|
@ -109,7 +109,9 @@ VPATH+= $S/crypto/rijndael
|
|||
VPATH+= $S/crypto/sha2
|
||||
VPATH+= $S/crypto/siphash
|
||||
VPATH+= $S/net
|
||||
ifdef FF_NETGRAPH
|
||||
VPATH+= $S/netgraph
|
||||
endif
|
||||
VPATH+= $S/netinet
|
||||
VPATH+= $S/netinet/libalias
|
||||
VPATH+= $S/netinet/cc
|
||||
|
@ -266,6 +268,7 @@ NET_SRCS+= \
|
|||
rtsock.c \
|
||||
slcompress.c
|
||||
|
||||
ifdef FF_NETGRAPH
|
||||
NETGRAPH_SRCS += \
|
||||
ng_async.c \
|
||||
ng_atmllc.c \
|
||||
|
@ -311,6 +314,7 @@ NETGRAPH_SRCS += \
|
|||
ng_UI.c \
|
||||
ng_vjc.c \
|
||||
ng_vlan.c
|
||||
endif
|
||||
|
||||
NETINET_SRCS+= \
|
||||
if_ether.c \
|
||||
|
|
|
@ -1096,6 +1096,7 @@ foffset_lock(struct file *fp, int flags)
|
|||
*/
|
||||
mtxp = mtx_pool_find(mtxpool_sleep, fp);
|
||||
mtx_lock(mtxp);
|
||||
/*
|
||||
if ((flags & FOF_NOLOCK) == 0) {
|
||||
while (fp->f_vnread_flags & FOFFSET_LOCKED) {
|
||||
fp->f_vnread_flags |= FOFFSET_LOCK_WAITING;
|
||||
|
@ -1104,6 +1105,7 @@ foffset_lock(struct file *fp, int flags)
|
|||
}
|
||||
fp->f_vnread_flags |= FOFFSET_LOCKED;
|
||||
}
|
||||
*/
|
||||
res = fp->f_offset;
|
||||
mtx_unlock(mtxp);
|
||||
return (res);
|
||||
|
|
|
@ -88,7 +88,7 @@ _sleep(void *ident, struct lock_object *lock, int priority,
|
|||
const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags)
|
||||
{
|
||||
//FIXME:we couldn't really sleep.
|
||||
return (0);
|
||||
return (EPERM);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue