| 1146 | } |
| 1147 | |
| 1148 | static int |
| 1149 | bpf_ready(struct bpf_d *d) |
| 1150 | { |
| 1151 | |
| 1152 | BPFD_LOCK_ASSERT(d); |
| 1153 | |
| 1154 | if (!bpf_canfreebuf(d) && d->bd_hlen != 0) |
| 1155 | return (1); |
| 1156 | if ((d->bd_immediate || d->bd_state == BPF_TIMED_OUT) && |
| 1157 | d->bd_slen != 0) |
| 1158 | return (1); |
| 1159 | return (0); |
| 1160 | } |
| 1161 | |
| 1162 | static int |
| 1163 | bpfwrite(struct cdev *dev, struct uio *uio, int ioflag) |
no test coverage detected