The hard part about fsck is that I can't just run /sbin/fsck, because I need its output not on stdout / stderr, but both of those on /dev/console.
Hm. Maybe I can... redirect stdout/stderr there from my main()! And then fsck becomes reasonably simple.
I think the hardest part about my mini-initd will be
fsck. Who would have thought it would be fucking hard. It's not like it's in the name.