lib: use errno
examples: change using mmap
fix typo
doc and setup