[PATCH] msghdr: print SCM_TIMESTAMP* control messages

Dmitry V. Levin ldv at altlinux.org
Thu Jun 15 10:18:18 UTC 2017


On Thu, Jun 15, 2017 at 11:39:34AM +0200, Miroslav Lichvar wrote:
> 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? 

It looks better.  Thinking of potential use, maybe these functions should
also return a boolean status indicating whether the printing was successful.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170615/df811cbb/attachment.bin>


More information about the Strace-devel mailing list