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