[PATCH] msghdr: print SCM_TIMESTAMP* control messages

Miroslav Lichvar mlichvar at redhat.com
Thu Jun 15 09:39:34 UTC 2017


On Thu, Jun 15, 2017 at 12:17:43PM +0300, Dmitry V. Levin wrote:
> On Thu, Jun 15, 2017 at 10:54:59AM +0200, Miroslav Lichvar wrote:
> > > What do you think these functions should print in case the data size
> > > is smaller than necessary?
> > 
> > Nothing. Is there a better option?
> 
> If you print nothing, you'd end up with this on x86_64:
> msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_TIMESTAMP, cmsg_data=}]
> It doesn't look nice, does it?

It does not, but it's not likely anyone will ever see it, right? :)
Would "cmsg_data=?" be better? 

> > If they don't have a
> > default value, the compilation will fail on systems that don't have
> > them yet. Would it be preferred to check for them in configure and
> > disable the printers if missing?
> 
> I've just added some ifdefery to xlat/scmvals.in ...

Thanks.

-- 
Miroslav Lichvar




More information about the Strace-devel mailing list