10
int rl_readfile(char *path, void **addr, int *len) {
15
if((fd = open(path, O_RDONLY)) < 0) {
16
rl_warn("Failed to open %s (%s)", path, strerror(errno));
20
rl_warn("Failed to fstat %d (%s)", fd, strerror(errno));
24
tmp = malloc(st.st_size);
26
rl_fatal(EX_SOFTWARE, "ABORT - Can't allocate memory");
27
if(read(fd, tmp, st.st_size) < 0) {
28
rl_warn("Failed to inhale file %s", path);