[ovs-dev] [PATCH 2/2] print: Print mod_vlan_vid action in hex

Justin Pettit jpettit at nicira.com
Sun Apr 11 23:40:55 UTC 2010


In a flow description, the VLAN VID was printed in hex, but an VLAN VID
modification would print the value in decimal.  This commit consistently
prints the value in hex.

CC: Paul Ingram <paul at nicira.com>
---
 lib/ofp-print.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index 937eb15..dfeae82 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -308,7 +308,7 @@ ofp_print_action(struct ds *string, const struct ofp_action_header *ah,
 
     case OFPAT_SET_VLAN_VID: {
         struct ofp_action_vlan_vid *va = (struct ofp_action_vlan_vid *)ah;
-        ds_put_format(string, "mod_vlan_vid:%"PRIu16, ntohs(va->vlan_vid));
+        ds_put_format(string, "mod_vlan_vid:0x%"PRIx16, ntohs(va->vlan_vid));
         break;
     }
 
-- 
1.7.0.3





More information about the dev mailing list