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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to