[PATCH v7] Implement decoding of ustat syscall

Dmitry V. Levin ldv at altlinux.org
Fri Jan 13 14:14:19 UTC 2017


On Fri, Jan 13, 2017 at 10:01:41PM +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.


-- 
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/0c1ade9b/attachment.bin>


More information about the Strace-devel mailing list