On Friday, January 31, 2014 04:24:50 Dmitry V. Levin wrote: > On Thu, Jan 30, 2014 at 06:53:43PM -0500, Mike Frysinger wrote: > > This syncs with the defines as available in linux-3.13. > > Applied, thanks. > > Wouldn't it be better to keep these constants sorted the same way as > they are sorted in uapi/linux/in.h?
they mostly are. at least, that's how i imported them. the problem is that
strace supports more than just Linux which means there are more defines than
just what's in uapi/linux/in.h. we also can't sort it alphabetically because
there are some compat defines that Linux carries but we don't want to decode
first (e.g. IP_ORIGDSTADDR and IP_RECVORIGDSTADDR).
what would help i think with maintaining these files is a little macro that i
use in other projects of mine:
#define Q(x) { x, #x },
then the lists become:
static const struct xlat domains[] = {
Q(PF_UNSPEC)
Q(PF_LOCAL)
Q(PF_UNIX)
...
};
-mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
