Date: Mon, 27 Apr 2020 23:39:32 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360409 - head/sys/cam/scsi Message-ID: <202004272339.03RNdX1P069687@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Mon Apr 27 23:39:32 2020 New Revision: 360409 URL: https://svnweb.freebsd.org/changeset/base/360409 Log: 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. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon Apr 27 23:17:19 2020 (r360408) +++ head/sys/cam/scsi/scsi_da.c Mon Apr 27 23:39:32 2020 (r360409) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004272339.03RNdX1P069687>