add strerror to bpf open error
This commit is contained in:
parent
f22aac2100
commit
a54ef5ad9b
@ -147,7 +147,7 @@ bx_fbsd_pktmover_c::bx_fbsd_pktmover_c(const char *netif,
|
|||||||
do {
|
do {
|
||||||
(void)sprintf(device, "/dev/bpf%d", n++);
|
(void)sprintf(device, "/dev/bpf%d", n++);
|
||||||
this->bpf_fd = open(device, O_RDWR);
|
this->bpf_fd = open(device, O_RDWR);
|
||||||
BX_INFO(("tried %s, returned %d",device,this->bpf_fd));
|
BX_INFO(("tried %s, returned %d (%s)",device,this->bpf_fd,strerror(errno)));
|
||||||
if(errno == EACCES)
|
if(errno == EACCES)
|
||||||
break;
|
break;
|
||||||
} while (this->bpf_fd == -1);
|
} while (this->bpf_fd == -1);
|
||||||
|
Loading…
Reference in New Issue
Block a user