Rewrite wrapper for CDI(check device info)

Signed-off-by: sndnvaps <sndnvaps@gmail.com>