ext4_utils: refactor kernel headers

Move the kernel header includes into a single include file that
can deal with getting the kernel int types correct on all
platforms.

Change-Id: Ied3dc6a0f5cbb3ceb686aa3de72f16e10a36462a
ext4_utils: move sparse file pointer out of fs_info

Move the sparse file pointer out of the fs_info struct in
preparation for exporting fs_info without sparse file support.

Change-Id: I5a72147fe4fb24296e615cb82dbba91c6dc6f7f0
ext4_utils: move superblock parsing to its own compilation unit

Move ext4_parse_sb to its own compilation unit so it can be used
from fs_mgr without pulling in all of libext4_utils' dependencies
when compiling with ld.bfd.

Change-Id: I185352ecea0e0d577b8cdddfd519f2826d631277
Remove bogus semicolons

Remove semicolons after function declarations.
They don't (currently) hurt, but they're invalid and might
break future compilers.

Change-Id: I82a2b414f2e465d40948c4a4f8f103023a7830de
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
ext4_utils: fix build for 64 bit

Correct u64/s64 definitions
Use PRIu64 to print u64

Change-Id: Icaf7998946b0a2faa03495b404af8b94e4e3d047
Merge changes Icaf79989,I185352ec,I5a72147f,Ied3dc6a0

* changes:
  ext4_utils: fix build for 64 bit
  ext4_utils: move superblock parsing to its own compilation unit
  ext4_utils: move sparse file pointer out of fs_info
  ext4_utils: refactor kernel headers
Merge "Remove bogus semicolons"
make_ext4fs: fix block allocation to be best-fit

The block allocation algorithm was failing to allocate parts of large
files out of partially filled block groups.  Update the allocation
algorithm to be a simpler best fit loop - if the remaining length to
allocate is larger than any single contiguous region, allocate the
largest single contiguous region and continue allocating, otherwise
allocate the smallest contiguous that can hold the length.

Change-Id: Idcc60df91ed0a266d3128ea46e86408a581d3f40
Merge "make_ext4fs: fix block allocation to be best-fit"
kexecload: fix LP64 warnings

Use uintptr_t for pointer arithmetic.

Change-Id: I69385fe67ce823f3b13d8dc73acf0a0ff5bb1e83
Merge "kexecload: fix LP64 warnings"
Set s_flags to 2 to prevent a write on first mount.

The s_flags field is used to indicate whether characters are signed
or unsigned, which differs between ARM and x86 targets. Setting
this value to 0 causes the correct value for the target to be
written back to the superblock on first mount, even if the fs is
marked read only.

Since this value is only used to ensure interoperability with 2.4
series kernels (which we don't need) in dirhash (which we don't
use), we'll just set it to 2 to prevent the write.

Change-Id: I92698235909791fb5f423cfd61ff5299307a8f97
Merge "Set s_flags to 2 to prevent a write on first mount."
Kitkat bring up.

* Dont build AOSP Su

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>