Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/nvmectl Report error code (SCT/SC).



details:   https://anonhg.NetBSD.org/src/rev/ea84037334fa
branches:  trunk
changeset: 368731:ea84037334fa
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Jul 31 12:11:44 2022 +0000

description:
Report error code (SCT/SC).

diffstat:

 sbin/nvmectl/logpage.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r cbff82c03ddc -r ea84037334fa sbin/nvmectl/logpage.c
--- a/sbin/nvmectl/logpage.c    Sun Jul 31 12:02:28 2022 +0000
+++ b/sbin/nvmectl/logpage.c    Sun Jul 31 12:11:44 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: logpage.c,v 1.8 2022/02/12 23:50:14 andvar Exp $       */
+/*     $NetBSD: logpage.c,v 1.9 2022/07/31 12:11:44 mlelstv Exp $      */
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: logpage.c,v 1.8 2022/02/12 23:50:14 andvar Exp $");
+__RCSID("$NetBSD: logpage.c,v 1.9 2022/07/31 12:11:44 mlelstv Exp $");
 #if 0
 __FBSDID("$FreeBSD: head/sbin/nvmecontrol/logpage.c 329824 2018-02-22 13:32:31Z wma $");
 #endif
@@ -124,7 +124,9 @@
                err(1, "get log page request failed");
 
        if (nvme_completion_is_error(&pt.cpl))
-               errx(1, "get log page request returned error");
+               errx(1, "get log page request returned error 0x%lx/0x%02lx",
+                       __SHIFTOUT(pt.cpl.flags, NVME_CQE_SCT_MASK),
+                       __SHIFTOUT(pt.cpl.flags, NVME_CQE_SC_MASK));
 }
 
 static void



Home | Main Index | Thread Index | Old Index