Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ mojoloader: mojoloader.c

clean:
$(RM) mojoloader

.PHONY: install
install: mojoloader
install --mode=0755 --owner root --group root --dir $(DESTDIR)/bin
install --mode=0755 --owner root --group root $^ $(DESTDIR)/bin
12 changes: 7 additions & 5 deletions mojoloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,13 @@ int main(int argc, char *argv[])
printf("OK\n");
}

write(fd, "L", 1);
wait_for_fd(fd, 0);
if(read(fd, buf, 1) != 1 || buf[0] != 'D') {
printf("Phase 4: Mojo didn't respond. Read %c\n", buf[0]);
return EXIT_FAILURE;
if (!ramonly) {
write(fd, "L", 1);
wait_for_fd(fd, 0);
if(read(fd, buf, 1) != 1 || buf[0] != 'D') {
printf("Phase 4: Mojo didn't respond. Read %c\n", buf[0]);
return EXIT_FAILURE;
}
}

return EXIT_SUCCESS;
Expand Down