Sometimes read returns fewer bytes than requested. read() only read at most 0x7ffff000 bytes. Bug: 376247649 Test: manual, make mkbootfs, mkbootfs out/target/product../VENDOR_BOOT Change-Id: I8cbbae40c5f5c6c54d19bf77e9a801ed3390ed48
Minimum changes just to get it to compile as C++, no real cleanup. Change-Id: I8ff3fa35a07cdc9a6a246e79e33581e5d6598833