int pfdev = -1;
if ((pfdev = open(pf_device, O_RDONLY)) == -1) {
- warn("unable to open %s", pf_device);
+ ERROR("unable to open %s", pf_device);
return (-1);
}
if (ioctl(pfdev, DIOCGETSTATUS, &status) == -1) {
- warn("DIOCGETSTATUS: %i", pfdev);
+ ERROR("DIOCGETSTATUS: %i", pfdev);
close(pfdev);
return (-1);
}
char *names[] = { "searches", "inserts", "removals" };
if ((pfdev = open(pf_device, O_RDONLY)) == -1) {
- warn("unable to open %s", pf_device);
+ ERROR("unable to open %s", pf_device);
return (-1);
}
if (ioctl(pfdev, DIOCGETSTATUS, &status) == -1) {
- warn("DIOCGETSTATUS: %i", pfdev);
+ ERROR("DIOCGETSTATUS: %i", pfdev);
close(pfdev);
return (-1);
}