From dc597ce8df5ae6efd2728a2d7ba7d92486028f79 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 2 Jul 2021 22:40:30 +0200 Subject: Adding upstream version 1.12. Signed-off-by: Daniel Baumann --- nvme-status.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 nvme-status.h (limited to 'nvme-status.h') diff --git a/nvme-status.h b/nvme-status.h new file mode 100644 index 0000000..92a474c --- /dev/null +++ b/nvme-status.h @@ -0,0 +1,14 @@ +#include +#include + +/* + * nvme_status_type - It gives SCT(Status Code Type) in status field in + * completion queue entry. + * @status: status field located at DW3 in completion queue entry + */ +static inline __u8 nvme_status_type(__u16 status) +{ + return (status & 0x700) >> 8; +} + +__u8 nvme_status_to_errno(int status, bool fabrics); -- cgit v1.2.3