redo device type as ffi, see #56
redo netbsd dev_t
close #56 redo osx device