On mmap errors, this function used to return the error code it got
from mmap(). Unfortunately, in at least two cases, this results in
rather obscure error messages:
$ para_afh -i .
main: No such device
$ touch foo; para_afh -i foo
main: Invalid argument
This simple patch specifically checks whether the given fd refers
to a directory or an empty file so that the error messages become
more readable:
$ para_afh -i .
main: failed to mmap "."
main: Is a directory
$ touch foo; para_afh -i foo
main: failed to mmap "foo"
main: file is empty