From: David Scott <dave.scott@citrix.com>
To: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com
Cc: David Scott <dave.scott@citrix.com>,
wei.liu2@citrix.com, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com
Subject: [PATCH v6 for-4.5 2/5] xl: move 'replace_string' further up the file
Date: Wed, 24 Sep 2014 21:48:02 +0100 [thread overview]
Message-ID: <1411591685-25308-3-git-send-email-dave.scott@citrix.com> (raw)
In-Reply-To: <1411591685-25308-1-git-send-email-dave.scott@citrix.com>
This allows the function to be reused more easily.
Signed-off-by: David Scott <dave.scott@citrix.com>
---
tools/libxl/xl_cmdimpl.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 698b3bc..1695f74 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -799,6 +799,12 @@ static void parse_vcpu_affinity(libxl_domain_build_info *b_info,
}
}
+static void replace_string(char **str, const char *val)
+{
+ free(*str);
+ *str = strdup(val);
+}
+
static void parse_config_data(const char *config_source,
const char *config_data,
int config_len,
@@ -1914,13 +1920,6 @@ static int match_option_size(const char *prefix, size_t len,
#define MATCH_OPTION(prefix, arg, oparg) \
match_option_size((prefix "="), sizeof((prefix)), (arg), &(oparg))
-static void replace_string(char **str, const char *val)
-{
- free(*str);
- *str = strdup(val);
-}
-
-
/* Preserve a copy of a domain under a new name. Updates *r_domid */
static int preserve_domain(uint32_t *r_domid, libxl_event *event,
libxl_domain_config *d_config)
--
1.7.10.4
next prev parent reply other threads:[~2014-09-24 20:48 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 20:48 xl, libxl: add support for 'channels' David Scott
2014-09-24 20:48 ` [PATCH v6 for-4.5 1/5] " David Scott
2014-09-25 18:56 ` Konrad Rzeszutek Wilk
2014-09-26 9:12 ` Wei Liu
2014-09-24 20:48 ` David Scott [this message]
2014-09-25 19:06 ` [PATCH v6 for-4.5 2/5] xl: move 'replace_string' further up the file Konrad Rzeszutek Wilk
2014-09-26 9:15 ` Wei Liu
2014-09-24 20:48 ` [PATCH v6 for-4.5 3/5] xl: add 'xstrdup' next to 'xrealloc' David Scott
2014-09-25 19:06 ` Konrad Rzeszutek Wilk
2014-09-26 9:22 ` Wei Liu
2014-09-24 20:48 ` [PATCH v6 for-4.5 4/5] xl: add 'trim' and 'split_string_into_pair' functions David Scott
2014-09-25 19:06 ` Konrad Rzeszutek Wilk
2014-09-26 10:09 ` Wei Liu
2014-09-26 15:45 ` Ian Jackson
2014-09-26 15:51 ` Wei Liu
2014-09-26 15:53 ` Ian Jackson
2014-09-24 20:48 ` [PATCH v6 for-4.5 5/5] xl: add support for 'channels' David Scott
2014-09-25 19:11 ` Konrad Rzeszutek Wilk
2014-09-26 10:22 ` Wei Liu
2014-09-25 19:13 ` xl, libxl: " Konrad Rzeszutek Wilk
2014-09-25 19:37 ` Dave Scott
2014-09-26 15:14 ` Ian Jackson
2014-09-26 19:20 ` Konrad Rzeszutek Wilk
2014-10-07 16:52 ` Dave Scott
2014-10-07 16:59 ` Konrad Rzeszutek Wilk
2014-10-08 11:06 ` Stefano Stabellini
2014-10-08 13:26 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411591685-25308-3-git-send-email-dave.scott@citrix.com \
--to=dave.scott@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).