[RFC PATCH v2 2/7] ndctl: nvdimmd: add nvdimmd necessary util functions