[PATCH v7] Implement decoding of ustat syscall

Dmitry V. Levin ldv at altlinux.org
Fri Jan 13 16:21:28 UTC 2017


On Fri, Jan 13, 2017 at 10:41:06PM +0800, JingPiao Chen wrote:
> >> +# ifdef HAVE_USTAT_H
> >> +#  include <ustat.h>
> >> +# else
> >> +#  include <stdint.h>
> >> +struct ustat {
> >> +     int32_t f_tfree;
> >> +     uint64_t f_tinode;
> >
> >This is not correct:
> >f_tfree is long on mips and sparc, and int on other architectures;
> >f_tinode is unsigned int on alpha and s390, and kernel_ulong_t on other
> >architectures;
> >also, struct ustat also contains f_fname[] and f_fpack[].
> >
> >In other words, you really need <ustat.h> to decode ustat.
> 
> Can you give me a hand? Is it if do not have ustat.h print ubuf pointer?

Yes, I think so.  What else can we do?


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


More information about the Strace-devel mailing list