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.
This commit is contained in:
Warner Losh 2020-04-27 23:39:32 +00:00
parent f1f9347546
commit 72f8ed61a7

View File

@ -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);