[CRIU] [PATCH] sockets: Print sockets ino and peer with %x format
Kir Kolyshkin
kir at openvz.org
Sun Apr 15 14:51:34 EDT 2012
13.04.2012 7:00 пользователь "Pavel Emelyanov" <xemul at parallels.com>
написал:
>
> On 04/13/2012 05:35 PM, Stanislav Kinsbursky wrote:
> > 13.04.2012 17:11, Cyrill Gorcunov пишет:
> >> On Fri, Apr 13, 2012 at 05:01:47PM +0400, Stanislav Kinsbursky wrote:
> >>> 13.04.2012 16:53, Cyrill Gorcunov пишет:
> >>>> Some ino/peers are printed with %d, some with %x,
> >>>> get rid of it and print all in %x.
> >>>>
> >>>
> >>>
> >>> 1) Why?
> >>
> >> Because I'm debuggin a problem and found that when we print
> >> image we use hex numbers, while when we print "Collected"
> >> we print ino in decimal format and I must admit I don't have
> >> skills to easily convert random numbers from dec to hex and
> >> back in head, espec if they are more than byte long.
> >>
> >
> > I was questioning, why not dec?
>
> Because hex can be printed in a fixed length string of 8 characters.
> For dec this would require 10, which is longer and thus less convenient
> for for eyes to read and compare.
The funny thing is, when you add 0x prefix, this 2 digits saving goes away.
The remark about "read and compare" is still valid though, since you don't
have to compare equal prefixes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openvz.org/pipermail/criu/attachments/20120415/43fe74c9/attachment.html
More information about the CRIU
mailing list