usemem: add --offset option for mmap
usemem hardcodes 0 as the offset for mmap, so add an option to specify
this. Use bytes for consistency with what mmap accepts.
How to parse the offset? The POSIX standard is vague about off_t
("Signed integer type used for file sizes."), but in the absence of a
strtoofft, it seems reasonably safe to use strtol. On 64-bit Arch and
Oracle Linux systems, off_t is the same size as long when compiling in
both 32-bit and 64-bit modes.
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
1 file changed