Page MenuHomeFreeBSD

Handle WITH/WITHOUT_PF in libsysdecode
ClosedPublic

Authored by kp on Jul 17 2017, 7:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 19, 4:49 PM
Unknown Object (File)
Jan 24 2024, 12:43 AM
Unknown Object (File)
Jan 6 2024, 5:45 AM
Unknown Object (File)
Dec 23 2023, 11:45 PM
Unknown Object (File)
Dec 23 2023, 10:17 AM
Unknown Object (File)
Dec 3 2023, 11:54 AM
Unknown Object (File)
Aug 28 2023, 6:41 AM
Unknown Object (File)
Aug 17 2023, 5:09 PM
Subscribers

Details

Summary

Only filter out the PF ioctls if we're building without pf support.
Until now those were always filtered out, so truss did not show symbolic
names for pf ioctls.

Test Plan

Built with and without WITHOUT_PF set.
Ran truss pfctl -s all with both versions of libsysdecode.so

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks like glebius@ added the exclusion. I think ideally we'd fix the headers to not result in compile failures during a WITHOUT_PF=yes buildworld then we would be able to leave them in always. The disk filter is no longer needed after pc98 was removed (and it was overly broad as it hid ioctls in <sys/disk.h>) so I'm going to be removing after a tinderbox build finishes.

If WITHOUT_PF is set we don't install pf.h (from sys/netpfil/pf), which means the generated file won't compile.
I suppose we could install it, but it's a little odd having pf.h installed if the user explicitly asked not to have pf.

Oh, ok. Shouldn't the includes not be present in the include dir then?

(I'm kicking off some tinderbox builds now to test the idea of just removing the pf filter altogether btw)

Ideally, yes, but it looks like the headers from sys/net (pfvar.h and if_pfsync.h) do get installed, so including those files leads to build failures.

Update patch after mkioctls was changed.

Thanks!

lib/libsysdecode/mkioctls
22 ↗(On Diff #31048)

I do feel like 'if [ ... ]; then' is the more common style in the tree (matches how { is used with if in C in style(9))?

This revision is now accepted and ready to land.Jul 21 2017, 4:45 PM
This revision was automatically updated to reflect the committed changes.

I've fixed that style remark and commit it. Thanks for the review!