Wireshark-dev: [Wireshark-dev] [patch] display of bits in the LOG SELECT command
From: Patrick vd Lageweg <patrick@xxxxxxxxxxxx>
Date: Tue, 10 Oct 2006 13:48:23 +0200
Hi,

This patch makes several bit fields in the LOG SELECT command being displayed as bits instead of as numbers.

	Patrick
Index: epan/dissectors/packet-scsi.c
===================================================================
--- epan/dissectors/packet-scsi.c	(revision 19477)
+++ epan/dissectors/packet-scsi.c	(working copy)
@@ -2229,11 +2229,11 @@
         flags = tvb_get_guint8 (tvb, offset);
 
         proto_tree_add_uint_format (tree, hf_scsi_logsel_flags, tvb, offset, 1,
-                                    flags, "PCR = %u, SP = %u", flags & 0x2,
+                                    flags, "PCR = %u, SP = %u", (flags & 0x2) >> 1,
                                     flags & 0x1);
         proto_tree_add_uint_format (tree, hf_scsi_logsel_pc, tvb, offset+1, 1,
                                     tvb_get_guint8 (tvb, offset+1),
-                                    "PC: 0x%x", flags & 0xC0);
+                                    "PC: 0x%x", (flags & 0xC0) >> 6);
         proto_tree_add_item (tree, hf_scsi_paramlen16, tvb, offset+6, 2, 0);
 
         flags = tvb_get_guint8 (tvb, offset+8);