shl: add shl_read_file() helper
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 12 Mar 2013 16:16:49 +0000 (17:16 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Tue, 12 Mar 2013 16:16:49 +0000 (17:16 +0100)
commite6d0d785436152a12f7ca9f159becba9fa17260d
tree92312d55eb70991344ef7ddd771dc0092ba2e3a3
parentddf4126c11823b0563c03bfd13feab6d4d04ccad
shl: add shl_read_file() helper

This reads in a complete file as a string and returns it to the caller.
The string is 0 terminated (which isn't guaranteed by mmap()) so this
helper is needed if we have to work with APIs that don't accept buffer
lengths.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
src/shl_misc.h