From patchwork Mon Feb 22 23:46:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ben@skyportsystems.com X-Patchwork-Id: 586585 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id CB5BB1401DE for ; Tue, 23 Feb 2016 10:47:38 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=skyportsystems.com header.i=@skyportsystems.com header.b=4mn2ZjKm; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 2B0EE108F2; Mon, 22 Feb 2016 15:47:25 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 26D57108E5 for ; Mon, 22 Feb 2016 15:47:22 -0800 (PST) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id B37E41627EE for ; Mon, 22 Feb 2016 16:47:21 -0700 (MST) X-ASG-Debug-ID: 1456184839-0b32373df5045d0001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar6.cudamail.com with ESMTP id Bl7Xr9lWBu2C6ieo (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 22 Feb 2016 16:47:19 -0700 (MST) X-Barracuda-Envelope-From: ben@skyportsystems.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mail-pf0-f174.google.com) (209.85.192.174) by mx1-pf2.cudamail.com with ESMTPS (RC4-SHA encrypted); 22 Feb 2016 23:47:18 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at _netblocks.google.com designates 209.85.192.174 as permitted sender) X-Barracuda-RBL-Trusted-Forwarder: 209.85.192.174 Received: by mail-pf0-f174.google.com with SMTP id e127so100970184pfe.3 for ; Mon, 22 Feb 2016 15:47:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skyportsystems.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ERRizaNJIONGL38wSSWP7qffRHtM7uDYUtCEZZoyesY=; b=4mn2ZjKmbAE0XGKj+LBYkNKU9tQ28nmGWNypLXRcjj0ZhV7nGO+yG23FEcB8ouimND qNKPxrcPkP4CRUPcoo6rKh2jZMST5aPVHmNzuHCDJhYqKHkTt67esAqATQi3sH3OdxRk Gtwbaj49OCk2yQqNOZJ9nJ0xiV7mz20dtn5L4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ERRizaNJIONGL38wSSWP7qffRHtM7uDYUtCEZZoyesY=; b=F5f3SpLzrDHa7ejvwcc9kKUuvNG+dJqfUQmxPHaDSwQyDbCbtJTy9xHDCpHO+Jdmex rod2XgKmi4oIkkRkZAxxKa2MdM+6pYr/vL9ht+ktX0El4Vqry4B7518XJXnyQ2uNe8bL klrd4Jmk1Ko7/AjFkZZNxInQBpeVhCOSVOnd9AEUQ6ARRzLpxMIysU10NQdkpBV8mmKI aOyMgmP5akO7qlTkGie3+nTziBr5+4zXW/CKuY60/Mvko5jad+dDsV7zK1of+aF9N9Vp bD5rhwc/ITM9PvDocs9WpER4RvaKEWxmcyOnmYOfSL2FvjpWU6TVtEapCFOm+btGDE4i ISoQ== X-Gm-Message-State: AG10YOS1pg4ytkKSG/P83gR4Er2cYMnxlxa7LTxb2E4qVYt+5VmAY4+LKSnU9J15a6zOmHdO X-Received: by 10.98.10.149 with SMTP id 21mr42195248pfk.75.1456184838237; Mon, 22 Feb 2016 15:47:18 -0800 (PST) Received: from Arrow.corp.skyportsystems.com (67-207-112-138.static.wiline.com. [67.207.112.138]) by smtp.gmail.com with ESMTPSA id cq4sm39516565pad.28.2016.02.22.15.47.17 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 22 Feb 2016 15:47:17 -0800 (PST) X-CudaMail-Envelope-Sender: ben@skyportsystems.com X-Barracuda-Apparent-Source-IP: 67.207.112.138 From: ben@skyportsystems.com To: dev@openvswitch.org X-CudaMail-MID: CM-E2-221092123 X-CudaMail-DTE: 022216 X-CudaMail-Originating-IP: 209.85.192.174 Date: Mon, 22 Feb 2016 15:46:56 -0800 X-ASG-Orig-Subj: [##CM-E2-221092123##][PATCH 6/9] Move lib/dynamic-string.h to include/openvswitch directory Message-Id: <1456184819-56124-7-git-send-email-ben@skyportsystems.com> X-Mailer: git-send-email 2.5.4 (Apple Git-61) In-Reply-To: <1456184819-56124-1-git-send-email-ben@skyportsystems.com> References: <1456184819-56124-1-git-send-email-ben@skyportsystems.com> X-GBUdb-Analysis: 0, 209.85.192.174, Ugly c=0.377531 p=-0.435897 Source Normal X-MessageSniffer-Rules: 0-0-0-32767-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1456184839 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 1.60 X-Barracuda-Spam-Status: No, SCORE=1.60 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_RULE7568M, BSF_RULE_7582B, BSF_SC5_MJ1963, DKIM_SIGNED, NO_REAL_NAME, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.27250 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.50 BSF_RULE7568M Custom Rule 7568M 0.50 BSF_RULE_7582B Custom Rule 7582B 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Cc: Ben Warren Subject: [ovs-dev] [PATCH 6/9] Move lib/dynamic-string.h to include/openvswitch directory X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" From: Ben Warren Signed-off-by: Ben Warren --- include/openvswitch/automake.mk | 1 + include/openvswitch/dynamic-string.h | 93 +++++++++++++++++++++++++++++++ lib/automake.mk | 1 - lib/backtrace.h | 2 +- lib/bfd.c | 2 +- lib/bundle.c | 2 +- lib/cfm.c | 2 +- lib/classifier.c | 2 +- lib/command-line.c | 2 +- lib/coverage.c | 2 +- lib/db-ctl-base.c | 2 +- lib/db-ctl-base.h | 2 +- lib/dp-packet.c | 2 +- lib/dpctl.c | 2 +- lib/dpif-netdev.c | 2 +- lib/dpif-netlink.c | 2 +- lib/dpif.c | 2 +- lib/dynamic-string.c | 2 +- lib/dynamic-string.h | 93 ------------------------------- lib/flow.c | 2 +- lib/json.c | 2 +- lib/jsonrpc.c | 2 +- lib/lacp.c | 2 +- lib/learn.c | 2 +- lib/match.c | 2 +- lib/memory.c | 2 +- lib/meta-flow.c | 2 +- lib/multipath.c | 2 +- lib/netdev-bsd.c | 2 +- lib/netdev-dummy.c | 2 +- lib/netdev-linux.c | 2 +- lib/netdev-vport.c | 2 +- lib/netdev.c | 2 +- lib/netlink-conntrack.c | 2 +- lib/netlink-conntrack.h | 2 +- lib/netlink-socket.c | 2 +- lib/nx-match.c | 2 +- lib/odp-util.c | 2 +- lib/ofp-actions.c | 2 +- lib/ofp-errors.c | 2 +- lib/ofp-msgs.c | 2 +- lib/ofp-parse.c | 2 +- lib/ofp-print.c | 2 +- lib/ofp-util.c | 2 +- lib/ofp-version-opt.c | 2 +- lib/ofpbuf.c | 2 +- lib/ovs-lldp.c | 2 +- lib/ovs-router.c | 2 +- lib/ovsdb-data.c | 2 +- lib/ovsdb-error.c | 2 +- lib/ovsdb-idl.c | 2 +- lib/ovsdb-types.c | 2 +- lib/packets.c | 2 +- lib/perf-counter.c | 2 +- lib/poll-loop.c | 2 +- lib/process.c | 2 +- lib/socket-util.c | 2 +- lib/stream-ssl.c | 2 +- lib/stream-tcp.c | 2 +- lib/stream.c | 2 +- lib/svec.c | 2 +- lib/syslog-direct.c | 2 +- lib/syslog-libc.c | 2 +- lib/table.c | 2 +- lib/timeval.c | 2 +- lib/tnl-neigh-cache.c | 2 +- lib/tnl-ports.c | 2 +- lib/tun-metadata.h | 2 +- lib/unicode.c | 2 +- lib/unixctl.c | 2 +- lib/vconn.c | 2 +- lib/vlog.c | 2 +- ofproto/bond.c | 2 +- ofproto/connmgr.c | 2 +- ofproto/ofproto-dpif-upcall.c | 2 +- ofproto/ofproto-dpif-xlate.c | 2 +- ofproto/ofproto-dpif.c | 2 +- ofproto/ofproto.c | 2 +- ofproto/tunnel.c | 2 +- ovn/controller-vtep/ovn-controller-vtep.c | 2 +- ovn/controller/chassis.c | 2 +- ovn/controller/lflow.c | 2 +- ovn/controller/ofctrl.c | 2 +- ovn/controller/ovn-controller.c | 2 +- ovn/lib/actions.c | 2 +- ovn/lib/expr.c | 2 +- ovn/lib/lex.c | 2 +- ovn/northd/ovn-northd.c | 2 +- ovn/utilities/ovn-sbctl.c | 2 +- ovsdb/column.c | 2 +- ovsdb/jsonrpc-server.c | 2 +- ovsdb/monitor.c | 2 +- ovsdb/ovsdb-client.c | 2 +- ovsdb/ovsdb-server.c | 2 +- ovsdb/ovsdb-tool.c | 2 +- ovsdb/row.c | 2 +- ovsdb/transaction.c | 2 +- tests/ovstest.c | 2 +- tests/test-netflow.c | 2 +- tests/test-odp.c | 2 +- tests/test-ovn.c | 2 +- tests/test-ovsdb.c | 2 +- tests/test-sflow.c | 2 +- utilities/ovs-appctl.c | 2 +- utilities/ovs-ofctl.c | 2 +- utilities/ovs-vsctl.c | 2 +- vswitchd/bridge.c | 2 +- vswitchd/system-stats.c | 2 +- vswitchd/xenserver.c | 2 +- vtep/vtep-ctl.c | 2 +- 110 files changed, 200 insertions(+), 200 deletions(-) create mode 100644 include/openvswitch/dynamic-string.h delete mode 100644 lib/dynamic-string.h diff --git a/include/openvswitch/automake.mk b/include/openvswitch/automake.mk index 3b5879a..a6343d2 100644 --- a/include/openvswitch/automake.mk +++ b/include/openvswitch/automake.mk @@ -1,6 +1,7 @@ openvswitchincludedir = $(includedir)/openvswitch openvswitchinclude_HEADERS = \ include/openvswitch/compiler.h \ + include/openvswitch/dynamic-string.h \ include/openvswitch/geneve.h \ include/openvswitch/list.h \ include/openvswitch/ofp-errors.h \ diff --git a/include/openvswitch/dynamic-string.h b/include/openvswitch/dynamic-string.h new file mode 100644 index 0000000..9c4b4b1 --- /dev/null +++ b/include/openvswitch/dynamic-string.h @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016 Nicira, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OPENVSWITCH_DYNAMIC_STRING_H +#define OPENVSWITCH_DYNAMIC_STRING_H 1 + +#include +#include +#include +#include +#include +#include +#include "openvswitch/compiler.h" + +/* A "dynamic string", that is, a buffer that can be used to construct a + * string across a series of operations that extend or modify it. + * + * The 'string' member does not always point to a null-terminated string. + * Initially it is NULL, and even when it is nonnull, some operations do not + * ensure that it is null-terminated. Use ds_cstr() to ensure that memory is + * allocated for the string and that it is null-terminated. */ +struct ds { + char *string; /* Null-terminated string. */ + size_t length; /* Bytes used, not including null terminator. */ + size_t allocated; /* Bytes allocated, not including null terminator. */ +}; + +#define DS_EMPTY_INITIALIZER { NULL, 0, 0 } + +void ds_init(struct ds *); +void ds_clear(struct ds *); +void ds_truncate(struct ds *, size_t new_length); +void ds_reserve(struct ds *, size_t min_length); +char *ds_put_uninit(struct ds *, size_t n); +static inline void ds_put_char(struct ds *, char); +void ds_put_utf8(struct ds *, int uc); +void ds_put_char_multiple(struct ds *, char, size_t n); +void ds_put_buffer(struct ds *, const char *, size_t n); +void ds_put_cstr(struct ds *, const char *); +void ds_put_and_free_cstr(struct ds *, char *); +void ds_put_format(struct ds *, const char *, ...) OVS_PRINTF_FORMAT(2, 3); +void ds_put_format_valist(struct ds *, const char *, va_list) + OVS_PRINTF_FORMAT(2, 0); +void ds_put_printable(struct ds *, const char *, size_t); +void ds_put_hex(struct ds *ds, const void *buf, size_t size); +void ds_put_hex_dump(struct ds *ds, const void *buf_, size_t size, + uintptr_t ofs, bool ascii); +int ds_get_line(struct ds *, FILE *); +int ds_get_preprocessed_line(struct ds *, FILE *, int *line_number); +int ds_get_test_line(struct ds *, FILE *); + +void ds_put_strftime_msec(struct ds *, const char *format, long long int when, + bool utc); +char *xastrftime_msec(const char *format, long long int when, bool utc); + +char *ds_cstr(struct ds *); +const char *ds_cstr_ro(const struct ds *); +char *ds_steal_cstr(struct ds *); +void ds_destroy(struct ds *); +void ds_swap(struct ds *, struct ds *); + +int ds_last(const struct ds *); +bool ds_chomp(struct ds *, int c); + +/* Inline functions. */ + +void ds_put_char__(struct ds *, char); + +static inline void +ds_put_char(struct ds *ds, char c) +{ + if (ds->length < ds->allocated) { + ds->string[ds->length++] = c; + ds->string[ds->length] = '\0'; + } else { + ds_put_char__(ds, c); + } +} + +#endif /* dynamic-string.h */ diff --git a/lib/automake.mk b/lib/automake.mk index 7ebbce1..45e2740 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -75,7 +75,6 @@ lib_libopenvswitch_la_SOURCES = \ lib/heap.c \ lib/heap.h \ lib/dynamic-string.c \ - lib/dynamic-string.h \ lib/entropy.c \ lib/entropy.h \ lib/fat-rwlock.c \ diff --git a/lib/backtrace.h b/lib/backtrace.h index 4810a7c..3eb92f7 100644 --- a/lib/backtrace.h +++ b/lib/backtrace.h @@ -18,7 +18,7 @@ #define BACKTRACE_H 1 #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" /* log_backtrace() will save the backtrace of a running program * into the log at the DEBUG level. diff --git a/lib/bfd.c b/lib/bfd.c index f976851..909697f 100644 --- a/lib/bfd.c +++ b/lib/bfd.c @@ -26,7 +26,7 @@ #include "csum.h" #include "dp-packet.h" #include "dpif.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "hash.h" #include "hmap.h" diff --git a/lib/bundle.c b/lib/bundle.c index f40fd20..784231e 100644 --- a/lib/bundle.c +++ b/lib/bundle.c @@ -20,7 +20,7 @@ #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "multipath.h" #include "meta-flow.h" #include "nx-match.h" diff --git a/lib/cfm.c b/lib/cfm.c index 587454a..cf1f725 100644 --- a/lib/cfm.c +++ b/lib/cfm.c @@ -24,7 +24,7 @@ #include "byte-order.h" #include "connectivity.h" #include "dp-packet.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "hash.h" #include "hmap.h" diff --git a/lib/classifier.c b/lib/classifier.c index cfcdc02..8bc6353 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -20,7 +20,7 @@ #include #include #include "byte-order.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "odp-util.h" #include "ofp-util.h" #include "packets.h" diff --git a/lib/command-line.c b/lib/command-line.c index 7b668a1..bda5ed6 100644 --- a/lib/command-line.c +++ b/lib/command-line.c @@ -19,7 +19,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ovs-thread.h" #include "util.h" #include "openvswitch/vlog.h" diff --git a/lib/coverage.c b/lib/coverage.c index 9584cac..6cef826 100644 --- a/lib/coverage.c +++ b/lib/coverage.c @@ -18,7 +18,7 @@ #include "coverage.h" #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "svec.h" #include "timeval.h" diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c index e3a1de9..849883b 100644 --- a/lib/db-ctl-base.c +++ b/lib/db-ctl-base.c @@ -25,7 +25,7 @@ #include "command-line.h" #include "compiler.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "hash.h" #include "json.h" diff --git a/lib/db-ctl-base.h b/lib/db-ctl-base.h index bada320..f8f576b 100644 --- a/lib/db-ctl-base.h +++ b/lib/db-ctl-base.h @@ -18,7 +18,7 @@ #define DB_CTL_BASE_H 1 #include "compiler.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "shash.h" struct ctl_context; diff --git a/lib/dp-packet.c b/lib/dp-packet.c index db3c857..aec7fe7 100644 --- a/lib/dp-packet.c +++ b/lib/dp-packet.c @@ -17,7 +17,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "netdev-dpdk.h" #include "dp-packet.h" #include "util.h" diff --git a/lib/dpctl.c b/lib/dpctl.c index 3292713..6f45078 100644 --- a/lib/dpctl.c +++ b/lib/dpctl.c @@ -32,7 +32,7 @@ #include "dirs.h" #include "dpctl.h" #include "dpif.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "match.h" #include "netdev.h" diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index f3dfbcc..cebd6d6 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -38,7 +38,7 @@ #include "dpif.h" #include "dpif-provider.h" #include "dummy.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fat-rwlock.h" #include "flow.h" #include "cmap.h" diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c index f1eaa51..6ac973e 100644 --- a/lib/dpif-netlink.c +++ b/lib/dpif-netlink.c @@ -34,7 +34,7 @@ #include "bitmap.h" #include "dpif-provider.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "fat-rwlock.h" #include "netdev.h" diff --git a/lib/dpif.c b/lib/dpif.c index df11b22..33783e1 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -27,7 +27,7 @@ #include "dpctl.h" #include "dp-packet.h" #include "dpif-netdev.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "netdev.h" #include "netlink.h" diff --git a/lib/dynamic-string.c b/lib/dynamic-string.c index a5a3460..1f17a9f 100644 --- a/lib/dynamic-string.c +++ b/lib/dynamic-string.c @@ -15,7 +15,7 @@ */ #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include #include #include diff --git a/lib/dynamic-string.h b/lib/dynamic-string.h deleted file mode 100644 index cc064c0..0000000 --- a/lib/dynamic-string.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016 Nicira, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef DYNAMIC_STRING_H -#define DYNAMIC_STRING_H 1 - -#include -#include -#include -#include -#include -#include -#include "compiler.h" - -/* A "dynamic string", that is, a buffer that can be used to construct a - * string across a series of operations that extend or modify it. - * - * The 'string' member does not always point to a null-terminated string. - * Initially it is NULL, and even when it is nonnull, some operations do not - * ensure that it is null-terminated. Use ds_cstr() to ensure that memory is - * allocated for the string and that it is null-terminated. */ -struct ds { - char *string; /* Null-terminated string. */ - size_t length; /* Bytes used, not including null terminator. */ - size_t allocated; /* Bytes allocated, not including null terminator. */ -}; - -#define DS_EMPTY_INITIALIZER { NULL, 0, 0 } - -void ds_init(struct ds *); -void ds_clear(struct ds *); -void ds_truncate(struct ds *, size_t new_length); -void ds_reserve(struct ds *, size_t min_length); -char *ds_put_uninit(struct ds *, size_t n); -static inline void ds_put_char(struct ds *, char); -void ds_put_utf8(struct ds *, int uc); -void ds_put_char_multiple(struct ds *, char, size_t n); -void ds_put_buffer(struct ds *, const char *, size_t n); -void ds_put_cstr(struct ds *, const char *); -void ds_put_and_free_cstr(struct ds *, char *); -void ds_put_format(struct ds *, const char *, ...) OVS_PRINTF_FORMAT(2, 3); -void ds_put_format_valist(struct ds *, const char *, va_list) - OVS_PRINTF_FORMAT(2, 0); -void ds_put_printable(struct ds *, const char *, size_t); -void ds_put_hex(struct ds *ds, const void *buf, size_t size); -void ds_put_hex_dump(struct ds *ds, const void *buf_, size_t size, - uintptr_t ofs, bool ascii); -int ds_get_line(struct ds *, FILE *); -int ds_get_preprocessed_line(struct ds *, FILE *, int *line_number); -int ds_get_test_line(struct ds *, FILE *); - -void ds_put_strftime_msec(struct ds *, const char *format, long long int when, - bool utc); -char *xastrftime_msec(const char *format, long long int when, bool utc); - -char *ds_cstr(struct ds *); -const char *ds_cstr_ro(const struct ds *); -char *ds_steal_cstr(struct ds *); -void ds_destroy(struct ds *); -void ds_swap(struct ds *, struct ds *); - -int ds_last(const struct ds *); -bool ds_chomp(struct ds *, int c); - -/* Inline functions. */ - -void ds_put_char__(struct ds *, char); - -static inline void -ds_put_char(struct ds *ds, char c) -{ - if (ds->length < ds->allocated) { - ds->string[ds->length++] = c; - ds->string[ds->length] = '\0'; - } else { - ds_put_char__(ds, c); - } -} - -#endif /* dynamic-string.h */ diff --git a/lib/flow.c b/lib/flow.c index 5668d0c..ad87ec9 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -28,7 +28,7 @@ #include "byte-order.h" #include "coverage.h" #include "csum.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "jhash.h" #include "match.h" diff --git a/lib/json.c b/lib/json.c index dd85213..4ac250b 100644 --- a/lib/json.c +++ b/lib/json.c @@ -24,7 +24,7 @@ #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "shash.h" #include "unicode.h" diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c index c0c27c2..33d23e1 100644 --- a/lib/jsonrpc.c +++ b/lib/jsonrpc.c @@ -21,7 +21,7 @@ #include #include "byteq.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "json.h" #include "openvswitch/list.h" diff --git a/lib/lacp.c b/lib/lacp.c index c5d0fb1..8ecef06 100644 --- a/lib/lacp.c +++ b/lib/lacp.c @@ -19,7 +19,7 @@ #include #include "connectivity.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "hmap.h" #include "dp-packet.h" diff --git a/lib/learn.c b/lib/learn.c index 4871539..3db3bca 100644 --- a/lib/learn.c +++ b/lib/learn.c @@ -19,7 +19,7 @@ #include "learn.h" #include "byte-order.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "match.h" #include "meta-flow.h" #include "nx-match.h" diff --git a/lib/match.c b/lib/match.c index 95d34bc..66d5a3c 100644 --- a/lib/match.c +++ b/lib/match.c @@ -18,7 +18,7 @@ #include "match.h" #include #include "byte-order.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ofp-util.h" #include "packets.h" #include "tun-metadata.h" diff --git a/lib/memory.c b/lib/memory.c index 3e21eb5..6a6a550 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -19,7 +19,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "poll-loop.h" #include "simap.h" #include "timeval.h" diff --git a/lib/meta-flow.c b/lib/meta-flow.c index 45670c2..44f9b03 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -24,7 +24,7 @@ #include #include "classifier.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "nx-match.h" #include "ofp-util.h" #include "ovs-thread.h" diff --git a/lib/multipath.c b/lib/multipath.c index 15af174..fe91203 100644 --- a/lib/multipath.c +++ b/lib/multipath.c @@ -21,7 +21,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "nx-match.h" #include "ofp-actions.h" #include "ofp-util.h" diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c index edf04bf..d11eeae 100644 --- a/lib/netdev-bsd.c +++ b/lib/netdev-bsd.c @@ -50,7 +50,7 @@ #include "coverage.h" #include "dp-packet.h" #include "dpif-netdev.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "openflow/openflow.h" #include "ovs-thread.h" diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index e95d305..91adfe6 100644 --- a/lib/netdev-dummy.c +++ b/lib/netdev-dummy.c @@ -22,7 +22,7 @@ #include "dp-packet.h" #include "dpif-netdev.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "openvswitch/list.h" #include "netdev-provider.h" diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index d58c1b1..4fa8b6a 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -52,7 +52,7 @@ #include "dp-packet.h" #include "dpif-netlink.h" #include "dpif-netdev.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "hash.h" #include "hmap.h" diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index 2031918..656362d 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -31,7 +31,7 @@ #include "dirs.h" #include "dpif.h" #include "dp-packet.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "hash.h" #include "hmap.h" diff --git a/lib/netdev.c b/lib/netdev.c index 8c73d60..8892bf7 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -27,7 +27,7 @@ #include "coverage.h" #include "dpif.h" #include "dp-packet.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "hash.h" #include "openvswitch/list.h" diff --git a/lib/netlink-conntrack.c b/lib/netlink-conntrack.c index d86587c..bd01c35 100644 --- a/lib/netlink-conntrack.c +++ b/lib/netlink-conntrack.c @@ -27,7 +27,7 @@ #include "byte-order.h" #include "compiler.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "netlink.h" #include "netlink-socket.h" #include "ofpbuf.h" diff --git a/lib/netlink-conntrack.h b/lib/netlink-conntrack.h index f1a4150..04a1ee1 100644 --- a/lib/netlink-conntrack.h +++ b/lib/netlink-conntrack.h @@ -20,7 +20,7 @@ #include "byte-order.h" #include "compiler.h" #include "ct-dpif.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hmap.h" #include "ofpbuf.h" #include "timeval.h" diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index bb45bb1..27c7c89 100644 --- a/lib/netlink-socket.c +++ b/lib/netlink-socket.c @@ -23,7 +23,7 @@ #include #include #include "coverage.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "hmap.h" #include "netlink.h" diff --git a/lib/nx-match.c b/lib/nx-match.c index a2f3685..42d8145 100644 --- a/lib/nx-match.c +++ b/lib/nx-match.c @@ -21,7 +21,7 @@ #include #include "classifier.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hmap.h" #include "meta-flow.h" #include "ofp-actions.h" diff --git a/lib/odp-util.c b/lib/odp-util.c index 95e86f2..6fba39e 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -29,7 +29,7 @@ #include "byte-order.h" #include "coverage.h" #include "dpif.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "netlink.h" #include "ofpbuf.h" diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index e33bfb2..25bcc51 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -22,7 +22,7 @@ #include "byte-order.h" #include "compiler.h" #include "dummy.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hmap.h" #include "learn.h" #include "meta-flow.h" diff --git a/lib/ofp-errors.c b/lib/ofp-errors.c index b4a1f8f..f20dcdb 100644 --- a/lib/ofp-errors.c +++ b/lib/ofp-errors.c @@ -17,7 +17,7 @@ #include #include #include "byte-order.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ofp-msgs.h" #include "ofp-util.h" #include "ofpbuf.h" diff --git a/lib/ofp-msgs.c b/lib/ofp-msgs.c index de20655..9d35df6 100644 --- a/lib/ofp-msgs.c +++ b/lib/ofp-msgs.c @@ -17,7 +17,7 @@ #include #include "ofp-msgs.h" #include "byte-order.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "hmap.h" #include "ofpbuf.h" diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index ab52674..60cf1c2 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -22,7 +22,7 @@ #include #include "byte-order.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "learn.h" #include "meta-flow.h" #include "multipath.h" diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 7784719..ceb512b 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -29,7 +29,7 @@ #include "bundle.h" #include "byte-order.h" #include "compiler.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "learn.h" #include "multipath.h" diff --git a/lib/ofp-util.c b/lib/ofp-util.c index a9f2f87..7731990 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -26,7 +26,7 @@ #include "bundle.h" #include "byte-order.h" #include "classifier.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "learn.h" #include "meta-flow.h" #include "multipath.h" diff --git a/lib/ofp-version-opt.c b/lib/ofp-version-opt.c index 1cf57e1..aaa5827 100644 --- a/lib/ofp-version-opt.c +++ b/lib/ofp-version-opt.c @@ -1,5 +1,5 @@ #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ofp-util.h" #include "ofp-version-opt.h" #include "ovs-thread.h" diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c index a3c4da4..f45ff44 100644 --- a/lib/ofpbuf.c +++ b/lib/ofpbuf.c @@ -18,7 +18,7 @@ #include "ofpbuf.h" #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "netdev-dpdk.h" #include "util.h" diff --git a/lib/ovs-lldp.c b/lib/ovs-lldp.c index ef781dd..b789677 100644 --- a/lib/ovs-lldp.c +++ b/lib/ovs-lldp.c @@ -34,7 +34,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "openvswitch/list.h" #include "lldp/lldpd.h" diff --git a/lib/ovs-router.c b/lib/ovs-router.c index d416bdb..f109016 100644 --- a/lib/ovs-router.c +++ b/lib/ovs-router.c @@ -33,7 +33,7 @@ #include "command-line.h" #include "compiler.h" #include "dpif.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "netdev.h" #include "packets.h" #include "seq.h" diff --git a/lib/ovsdb-data.c b/lib/ovsdb-data.c index 75febad..22176cd 100644 --- a/lib/ovsdb-data.c +++ b/lib/ovsdb-data.c @@ -22,7 +22,7 @@ #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "ovs-thread.h" #include "ovsdb-error.h" diff --git a/lib/ovsdb-error.c b/lib/ovsdb-error.c index 8be4d16..d3549cb 100644 --- a/lib/ovsdb-error.c +++ b/lib/ovsdb-error.c @@ -20,7 +20,7 @@ #include #include "backtrace.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "util.h" #include "openvswitch/vlog.h" diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 4cb1c81..a712371 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -24,7 +24,7 @@ #include "bitmap.h" #include "coverage.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "json.h" #include "jsonrpc.h" diff --git a/lib/ovsdb-types.c b/lib/ovsdb-types.c index 8fe0d42..91d5216 100644 --- a/lib/ovsdb-types.c +++ b/lib/ovsdb-types.c @@ -20,7 +20,7 @@ #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "ovs-thread.h" #include "ovsdb-data.h" diff --git a/lib/packets.c b/lib/packets.c index d82341d..878ca7e 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -27,7 +27,7 @@ #include "crc32c.h" #include "flow.h" #include "hmap.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ovs-thread.h" #include "odp-util.h" #include "dp-packet.h" diff --git a/lib/perf-counter.c b/lib/perf-counter.c index 62e2d76..c5144e7 100644 --- a/lib/perf-counter.c +++ b/lib/perf-counter.c @@ -26,7 +26,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "perf-counter.h" #include "shash.h" #include "util.h" diff --git a/lib/poll-loop.c b/lib/poll-loop.c index a34a467..925198f 100644 --- a/lib/poll-loop.c +++ b/lib/poll-loop.c @@ -22,7 +22,7 @@ #include #include #include "coverage.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "openvswitch/list.h" #include "ovs-thread.h" diff --git a/lib/process.c b/lib/process.c index 7802910..5c257ed 100644 --- a/lib/process.c +++ b/lib/process.c @@ -26,7 +26,7 @@ #include #include #include "coverage.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "openvswitch/list.h" #include "ovs-thread.h" diff --git a/lib/socket-util.c b/lib/socket-util.c index 6f959b2..5463c93 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -32,7 +32,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ovs-thread.h" #include "packets.h" #include "poll-loop.h" diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index 2699633..6ef9803 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -33,7 +33,7 @@ #include #include #include "coverage.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "entropy.h" #include "ofpbuf.h" #include "openflow/openflow.h" diff --git a/lib/stream-tcp.c b/lib/stream-tcp.c index fc5a606..2b57ca7 100644 --- a/lib/stream-tcp.c +++ b/lib/stream-tcp.c @@ -25,7 +25,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "packets.h" #include "socket-util.h" #include "util.h" diff --git a/lib/stream.c b/lib/stream.c index 217191c..f6602b2 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -23,7 +23,7 @@ #include #include #include "coverage.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "flow.h" #include "jsonrpc.h" diff --git a/lib/svec.c b/lib/svec.c index 7fe8beb..aad04e3 100644 --- a/lib/svec.c +++ b/lib/svec.c @@ -19,7 +19,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "util.h" #include "openvswitch/vlog.h" diff --git a/lib/syslog-direct.c b/lib/syslog-direct.c index f41d881..85ca9e2 100644 --- a/lib/syslog-direct.c +++ b/lib/syslog-direct.c @@ -21,7 +21,7 @@ #include #include "compiler.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "socket-util.h" #include "syslog-provider.h" #include "util.h" diff --git a/lib/syslog-libc.c b/lib/syslog-libc.c index f879658..8858c3c 100644 --- a/lib/syslog-libc.c +++ b/lib/syslog-libc.c @@ -22,7 +22,7 @@ #include #include "compiler.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "socket-util.h" #include "syslog-provider.h" #include "util.h" diff --git a/lib/table.c b/lib/table.c index 4628170..a2cfe3d 100644 --- a/lib/table.c +++ b/lib/table.c @@ -18,7 +18,7 @@ #include "table.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "ovsdb-data.h" #include "ovsdb-error.h" diff --git a/lib/timeval.c b/lib/timeval.c index d390df1..2d53339 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -27,7 +27,7 @@ #include #include "coverage.h" #include "dummy.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "hash.h" #include "hmap.h" diff --git a/lib/tnl-neigh-cache.c b/lib/tnl-neigh-cache.c index 0339b52..a62402c 100644 --- a/lib/tnl-neigh-cache.c +++ b/lib/tnl-neigh-cache.c @@ -28,7 +28,7 @@ #include "cmap.h" #include "coverage.h" #include "dpif-netdev.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "errno.h" #include "flow.h" #include "netdev.h" diff --git a/lib/tnl-ports.c b/lib/tnl-ports.c index c8eeb22..72aa9f2 100644 --- a/lib/tnl-ports.c +++ b/lib/tnl-ports.c @@ -23,7 +23,7 @@ #include #include "classifier.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "openvswitch/list.h" #include "netdev.h" diff --git a/lib/tun-metadata.h b/lib/tun-metadata.h index 14471de..37cf3ce 100644 --- a/lib/tun-metadata.h +++ b/lib/tun-metadata.h @@ -19,7 +19,7 @@ #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "netlink.h" #include "ofpbuf.h" #include "openflow/openflow.h" diff --git a/lib/unicode.c b/lib/unicode.c index 31612a2..846896d 100644 --- a/lib/unicode.c +++ b/lib/unicode.c @@ -20,7 +20,7 @@ #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "util.h" /* Returns the unicode code point corresponding to leading surrogate 'leading' diff --git a/lib/unixctl.c b/lib/unixctl.c index 446b168..acbef1a 100644 --- a/lib/unixctl.c +++ b/lib/unixctl.c @@ -20,7 +20,7 @@ #include #include "coverage.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "jsonrpc.h" #include "openvswitch/list.h" diff --git a/lib/vconn.c b/lib/vconn.c index 69b39d7..e634892 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -23,7 +23,7 @@ #include #include #include "coverage.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "flow.h" #include "ofp-msgs.h" diff --git a/lib/vlog.c b/lib/vlog.c index bbc6eb6..4c36f1b 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -31,7 +31,7 @@ #include "async-append.h" #include "coverage.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ofpbuf.h" #include "ovs-thread.h" #include "sat-math.h" diff --git a/ofproto/bond.c b/ofproto/bond.c index 8959b12..534ed28 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -31,7 +31,7 @@ #include "ofproto/ofproto-dpif-rid.h" #include "connectivity.h" #include "coverage.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "hmap.h" #include "lacp.h" diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index cdd7a69..07c4f63 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -22,7 +22,7 @@ #include #include "coverage.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fail-open.h" #include "in-band.h" #include "odp-util.h" diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index c55c79f..9c64b6b 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -23,7 +23,7 @@ #include "coverage.h" #include "cmap.h" #include "dpif.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fail-open.h" #include "guarded-list.h" #include "latch.h" diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 858d43a..6b273da 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -33,7 +33,7 @@ #include "coverage.h" #include "dp-packet.h" #include "dpif.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "in-band.h" #include "lacp.h" #include "learn.h" diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 6f98fed..ca10098 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -31,7 +31,7 @@ #include "cfm.h" #include "ovs-lldp.h" #include "dpif.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fail-open.h" #include "guarded-list.h" #include "hmapx.h" diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 6801754..423f1ad 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -28,7 +28,7 @@ #include "connectivity.h" #include "connmgr.h" #include "coverage.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "hmap.h" #include "meta-flow.h" diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c index a63cf71..551334f 100644 --- a/ofproto/tunnel.c +++ b/ofproto/tunnel.c @@ -21,7 +21,7 @@ #include "connectivity.h" #include "csum.h" #include "dpif.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fat-rwlock.h" #include "hash.h" #include "hmap.h" diff --git a/ovn/controller-vtep/ovn-controller-vtep.c b/ovn/controller-vtep/ovn-controller-vtep.c index 518a65d..bad3316 100644 --- a/ovn/controller-vtep/ovn-controller-vtep.c +++ b/ovn/controller-vtep/ovn-controller-vtep.c @@ -25,7 +25,7 @@ #include "compiler.h" #include "daemon.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "poll-loop.h" #include "stream.h" diff --git a/ovn/controller/chassis.c b/ovn/controller/chassis.c index f0dfaa5..67f3085 100644 --- a/ovn/controller/chassis.c +++ b/ovn/controller/chassis.c @@ -16,8 +16,8 @@ #include #include "chassis.h" -#include "lib/dynamic-string.h" #include "lib/vswitch-idl.h" +#include "openvswitch/dynamic-string.h" #include "openvswitch/vlog.h" #include "ovn/lib/ovn-sb-idl.h" #include "ovn-controller.h" diff --git a/ovn/controller/lflow.c b/ovn/controller/lflow.c index d53213c..e60c594 100644 --- a/ovn/controller/lflow.c +++ b/ovn/controller/lflow.c @@ -15,7 +15,7 @@ #include #include "lflow.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ofctrl.h" #include "ofp-actions.h" #include "ofpbuf.h" diff --git a/ovn/controller/ofctrl.c b/ovn/controller/ofctrl.c index 3297fb3..5f4982f 100644 --- a/ovn/controller/ofctrl.c +++ b/ovn/controller/ofctrl.c @@ -16,7 +16,7 @@ #include #include "ofctrl.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hmap.h" #include "match.h" #include "ofp-actions.h" diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c index 3638342..a92d1cd 100644 --- a/ovn/controller/ovn-controller.c +++ b/ovn/controller/ovn-controller.c @@ -27,7 +27,7 @@ #include "compiler.h" #include "daemon.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "openvswitch/vconn.h" #include "openvswitch/vlog.h" #include "ovn/lib/ovn-sb-idl.h" diff --git a/ovn/lib/actions.c b/ovn/lib/actions.c index 42e7f3b..91cf066 100644 --- a/ovn/lib/actions.c +++ b/ovn/lib/actions.c @@ -19,7 +19,7 @@ #include #include #include "compiler.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "expr.h" #include "lex.h" #include "logical-fields.h" diff --git a/ovn/lib/expr.c b/ovn/lib/expr.c index e196922..8a2e920 100644 --- a/ovn/lib/expr.c +++ b/ovn/lib/expr.c @@ -16,7 +16,7 @@ #include #include "expr.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "lex.h" #include "logical-fields.h" diff --git a/ovn/lib/lex.c b/ovn/lib/lex.c index 481f11e..9cad5c7 100644 --- a/ovn/lib/lex.c +++ b/ovn/lib/lex.c @@ -19,7 +19,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "packets.h" #include "util.h" diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index e6271cf..d3a81ee 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -21,7 +21,7 @@ #include "command-line.h" #include "daemon.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "hash.h" #include "hmap.h" diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c index b9e3c10..4941918 100644 --- a/ovn/utilities/ovn-sbctl.c +++ b/ovn/utilities/ovn-sbctl.c @@ -31,7 +31,7 @@ #include "command-line.h" #include "compiler.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "json.h" #include "ovsdb-data.h" diff --git a/ovsdb/column.c b/ovsdb/column.c index 26b7a0b..7cad97d 100644 --- a/ovsdb/column.c +++ b/ovsdb/column.c @@ -20,7 +20,7 @@ #include #include "column.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "ovsdb-error.h" #include "ovsdb-parser.h" diff --git a/ovsdb/jsonrpc-server.c b/ovsdb/jsonrpc-server.c index 0d23b77..028dda6 100644 --- a/ovsdb/jsonrpc-server.c +++ b/ovsdb/jsonrpc-server.c @@ -21,7 +21,7 @@ #include "bitmap.h" #include "column.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "monitor.h" #include "json.h" #include "jsonrpc.h" diff --git a/ovsdb/monitor.c b/ovsdb/monitor.c index 5ae9cdb..4cfb22c 100644 --- a/ovsdb/monitor.c +++ b/ovsdb/monitor.c @@ -20,7 +20,7 @@ #include "bitmap.h" #include "column.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "jsonrpc.h" #include "ovsdb-error.h" diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c index 980cd9a..80819a8 100644 --- a/ovsdb/ovsdb-client.c +++ b/ovsdb/ovsdb-client.c @@ -30,7 +30,7 @@ #include "compiler.h" #include "daemon.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "json.h" #include "jsonrpc.h" diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index cc3055b..4e2c8d0 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -26,7 +26,7 @@ #include "command-line.h" #include "daemon.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "file.h" #include "hash.h" diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c index 32883e2..37e219f 100644 --- a/ovsdb/ovsdb-tool.c +++ b/ovsdb/ovsdb-tool.c @@ -26,7 +26,7 @@ #include "command-line.h" #include "compiler.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "file.h" #include "lockfile.h" diff --git a/ovsdb/row.c b/ovsdb/row.c index 9b9f96a..d332407 100644 --- a/ovsdb/row.c +++ b/ovsdb/row.c @@ -19,7 +19,7 @@ #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "ovsdb-error.h" #include "shash.h" diff --git a/ovsdb/transaction.c b/ovsdb/transaction.c index 7f13e09..725c6f5 100644 --- a/ovsdb/transaction.c +++ b/ovsdb/transaction.c @@ -18,7 +18,7 @@ #include "transaction.h" #include "bitmap.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "hmap.h" #include "json.h" diff --git a/tests/ovstest.c b/tests/ovstest.c index 3f3430d..2fb7f66 100644 --- a/tests/ovstest.c +++ b/tests/ovstest.c @@ -22,7 +22,7 @@ #include #include #include "command-line.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ovstest.h" #include "util.h" diff --git a/tests/test-netflow.c b/tests/test-netflow.c index 47d0f20..fa0920e 100644 --- a/tests/test-netflow.c +++ b/tests/test-netflow.c @@ -24,7 +24,7 @@ #include #include "command-line.h" #include "daemon.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ofpbuf.h" #include "ovstest.h" #include "packets.h" diff --git a/tests/test-odp.c b/tests/test-odp.c index 5225535..9a2e520 100644 --- a/tests/test-odp.c +++ b/tests/test-odp.c @@ -18,7 +18,7 @@ #undef NDEBUG #include "odp-util.h" #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "flow.h" #include "match.h" #include "ofpbuf.h" diff --git a/tests/test-ovn.c b/tests/test-ovn.c index ae2787c..bbae84c 100644 --- a/tests/test-ovn.c +++ b/tests/test-ovn.c @@ -19,7 +19,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "match.h" #include "ofp-actions.h" diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c index 670a141..f0bbfcd 100644 --- a/tests/test-ovsdb.c +++ b/tests/test-ovsdb.c @@ -24,7 +24,7 @@ #include #include "command-line.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "jsonrpc.h" #include "ovsdb-data.h" diff --git a/tests/test-sflow.c b/tests/test-sflow.c index 8f9ccf4..aa003fd 100644 --- a/tests/test-sflow.c +++ b/tests/test-sflow.c @@ -27,7 +27,7 @@ #include #include "command-line.h" #include "daemon.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "ofpbuf.h" #include "ovstest.h" #include "packets.h" diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c index ff6163c..8f87cc4 100644 --- a/utilities/ovs-appctl.c +++ b/utilities/ovs-appctl.c @@ -25,7 +25,7 @@ #include "command-line.h" #include "daemon.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "jsonrpc.h" #include "process.h" #include "timeval.h" diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index a9cd17e..1034cca 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -35,7 +35,7 @@ #include "daemon.h" #include "compiler.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "nx-match.h" #include "odp-util.h" diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index eeb711f..c0a5d11 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -31,7 +31,7 @@ #include "command-line.h" #include "compiler.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "hash.h" #include "json.h" diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 298c607..968781d 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -28,7 +28,7 @@ #include "daemon.h" #include "dirs.h" #include "dpif.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "hash.h" #include "hmap.h" #include "hmapx.h" diff --git a/vswitchd/system-stats.c b/vswitchd/system-stats.c index b8a8855..e83b659 100644 --- a/vswitchd/system-stats.c +++ b/vswitchd/system-stats.c @@ -33,7 +33,7 @@ #include "daemon.h" #include "dirs.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "json.h" #include "latch.h" #include "ofpbuf.h" diff --git a/vswitchd/xenserver.c b/vswitchd/xenserver.c index a1a6231..9a0afea 100644 --- a/vswitchd/xenserver.c +++ b/vswitchd/xenserver.c @@ -21,7 +21,7 @@ #include #include #include -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "process.h" #include "util.h" #include "openvswitch/vlog.h" diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c index bf42f1c..3c93f77 100644 --- a/vtep/vtep-ctl.c +++ b/vtep/vtep-ctl.c @@ -31,7 +31,7 @@ #include "command-line.h" #include "compiler.h" -#include "dynamic-string.h" +#include "openvswitch/dynamic-string.h" #include "fatal-signal.h" #include "hash.h" #include "json.h"