From 72f8ed61a70e153e94ebb5f373b6846d36daf54c Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 27 Apr 2020 23:39:32 +0000 Subject: [PATCH] Change the flags back to an enum This was changed in the review process for the flags sysctl. The reasons for the change are no longer valid as the code changed after that. Cast the one place where it might make a difference (but I don't think it does). This restores the ability to see flags for softc in gdb. --- sys/cam/scsi/scsi_da.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index ca515442042d..d648d511b1a2 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -342,7 +342,7 @@ struct da_softc { LIST_HEAD(, ccb_hdr) pending_ccbs; int refcount; /* Active xpt_action() calls */ da_state state; - u_int flags; + da_flags flags; da_quirks quirks; int minimum_cmd_size; int error_inject; @@ -2646,7 +2646,7 @@ daflagssysctl(SYSCTL_HANDLER_ARGS) sbuf_new_for_sysctl(&sbuf, NULL, 0, req); if (softc->flags != 0) - sbuf_printf(&sbuf, "0x%b", softc->flags, DA_FLAG_STRING); + sbuf_printf(&sbuf, "0x%b", (unsigned)softc->flags, DA_FLAG_STRING); else sbuf_printf(&sbuf, "0"); error = sbuf_finish(&sbuf);