]> git.proxmox.com Git - ovs.git/commitdiff
table: Introduce a constant for default table style.
authorJakub Sitnicki <jkbs@redhat.com>
Thu, 19 Jul 2018 13:51:06 +0000 (15:51 +0200)
committerBen Pfaff <blp@ovn.org>
Mon, 23 Jul 2018 22:48:09 +0000 (15:48 -0700)
Having a constant in addition to the constant expression for the default
table style allows us to reset 'struct table_style' variables to default
style.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/table.h

index 313ac1dd287716013f368f3d5267aebc755031c9..76e65bb70f34707fe78ededead2596665c6aaa9a 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdbool.h>
 #include <stddef.h>
 #include "compiler.h"
+#include "openvswitch/json.h"
 
 struct ds;
 struct table_style;
@@ -83,6 +84,7 @@ struct table_style {
 };
 
 #define TABLE_STYLE_DEFAULT { TF_LIST, CF_STRING, true, JSSF_SORT, 0 }
+static const struct table_style table_style_default = TABLE_STYLE_DEFAULT;
 
 #define TABLE_OPTION_ENUMS                      \
     OPT_NO_HEADINGS,                            \