nvme-status: Introduce nvme status module to map errno
Background:
It's not enough to return the nvme status value in main() because it's
allowed to be in 8bits, but nvme status is indicated in 16bits. So we
has not been able to figure out what kind of nvme status has been
returned by return value.
This patch introduces nvme-status module that manages mapping between
nvme status and errno. It's not possible to make 1:1 mapping relations,
but we can map it as a groups.
All the internal errors which has been returned in a negative value will
be returned with ECOMM that indicates communication errors. In this
case, we can see what happened via stderr.
Cc: Keith Busch <kbusch@kernel.org> Cc: Chaitanya Kulkarni <chaitanya.Kulkarni@wdc.com> Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>