This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 2/2] sysdeps/statfs: Handle 64-bit ino_t types on 32-bit hosts
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Alistair Francis <alistair dot francis at wdc dot com>
- Cc: <libc-alpha at sourceware dot org>, <macro at wdc dot com>, <alistair23 at gmail dot com>
- Date: Thu, 19 Sep 2019 20:36:38 +0000
- Subject: Re: [PATCH v2 2/2] sysdeps/statfs: Handle 64-bit ino_t types on 32-bit hosts
- Ironport-sdr: 8QRX5djK4NaO9bpQrPg/jvwCUGfqMkqy2PhJB1v7X7T6yrs23vlTksWtxer4JyZLlj7beUmZNq DvmkE4b8bfQL3lDRQ6ykzUnRrDhF45NGEX31vj9IVst8ID7D3wdtR8Swoe9uJDT4lzjnuYkzEc aMwp+SYmuV8qM8F+TLUgByueHnpEfMdiXdy8vXfUNu4gOWCEL9JBbwkngb3zpYAo8Z9F1IQFw3 BdebCeWVtVraOqe6LJ11blCrvRqCGe+sA63h9JkKodKC6xE/Aasy1f/1cSJiF9jG6K6+6aWYR9 /F0=
- Ironport-sdr: 6IjnMMVt0WcC4kVWf/QRwK2D6ZR18Za3pxlpz8UG2UiPudf31kg5VRgSX+15LZjNiRmyrGTOL9 iIw1fjbuLO+4QyG4mxxTZJAdL3+v1mpj33KedIf/gXUJhsTTBIPC2G79g//nAfDE6+YztF+5iK eM6Zo95HJpjKIlYQpeqEEcV+lsaa+2LRb2xOH+NcHywpXa+ykraGQJxwXQX7u0WeJeujek8P+u Cpkm2sAk9VtbeY5UfXA7+3CMFl7y+K7uIyHr2tyZjNqjl9mmmNszBi7QN+wH2vCEYEIUzguJnt u2M=
- References: <20190918235448.5037-1-alistair.francis@wdc.com> <20190918235448.5037-2-alistair.francis@wdc.com>
On Wed, 18 Sep 2019, Alistair Francis wrote:
> On a 32-bit platform with a 64-bit ino_t type (__INO_T_MATCHES_INO64_T
> defined) we want to update the statfs struct to remove the padding as it
> isn't required. As we don't have the padding we also need to update the
> overflow checker to not access the undefined members.
I don't think this is anything to do with ino_t (or off_t). It's actually
about whether fsblkcnt_t matches fsblkcnt64_t and fsfilcnt_t matches
fsfilcnt64_t. It would seem cleanest for those to get their own macros
saying whether those types match. Or, more simply, a single macro
__STATFS_MATCHES_STATFS64.
--
Joseph S. Myers
joseph@codesourcery.com