mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-25 01:07:22 +00:00
On very large HDDs, the sector count was wrapping around. Switch most calculations to bytes using uint64_t, and use BLKGETSIZE64 for checking the loopback device size. BUG=chrome-os-partner:12705 TEST=parrot build, manual testing STATUS=Fixed Change-Id: I1f7aea81151ed5cc130b1f6a05fda83f7a85150f Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/31073 Reviewed-by: Elly Jones <ellyjones@chromium.org>