linux-user: fix statfs
commit229d3376a38bf97aa09b6f73a957c5389badcd06
authorAlexander Graf <agraf@suse.de>
Wed, 19 Sep 2012 02:39:53 +0000 (19 04:39 +0200)
committerRiku Voipio <riku.voipio@linaro.org>
Fri, 12 Oct 2012 10:58:13 +0000 (12 13:58 +0300)
treeec21f7a413a5a8aaa9e30344404a97f2f75c3a3c
parentb4ae3cfa57b8c1bdbbd7b7d420971e9171203ade
linux-user: fix statfs

The statfs syscall should always memset(0) its full struct extent before
writing to it. Newer versions of the syscall use one of the reserved fields
for flags, which would otherwise get stale values from uncleaned memory.

This fixes libarchive for me, which got confused about the return value of
pathconf("/", _PC_REC_XFER_ALIGN) otherwise, as it some times gave old pointers
as return value.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/syscall.c