Patchwork [v8,3/6] sockets: Make inet_parse() non static.

login
register
mail settings
Submitter Bharata B Rao
Date Sept. 24, 2012, 8:54 a.m.
Message ID <20120924085401.GF18470@in.ibm.com>
Download mbox | patch
Permalink /patch/186318/
State New
Headers show

Comments

Bharata B Rao - Sept. 24, 2012, 8:54 a.m.
sockets: Make inet_parse() non static.

From: Bharata B Rao <bharata@linux.vnet.ibm.com>

Make inet_parse() non-static so that other subsystems like gluster
can use it to parse inet addresses.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
---

 qemu-sockets.c |    2 +-
 qemu_socket.h  |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/qemu-sockets.c b/qemu-sockets.c
index 25285f2..e01ea8a 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -414,7 +414,7 @@  err:
  * port option of @opts. If default_port is -1, then the parser will
  * look for the port specification in @str mandatorily.
  */
-static int inet_parse(QemuOpts *opts, const char *str, int default_port)
+int inet_parse(QemuOpts *opts, const char *str, int default_port)
 {
     const char *optstr, *h;
     char addr[64];
diff --git a/qemu_socket.h b/qemu_socket.h
index c87ee57..309a389 100644
--- a/qemu_socket.h
+++ b/qemu_socket.h
@@ -48,6 +48,7 @@  int inet_connect_opts(QemuOpts *opts, bool *in_progress, Error **errp);
 int inet_connect(const char *str, bool block, bool *in_progress, Error **errp);
 int inet_dgram_opts(QemuOpts *opts);
 const char *inet_strfamily(int family);
+int inet_parse(QemuOpts *opts, const char *str, int default_port);
 
 int unix_listen_opts(QemuOpts *opts);
 int unix_listen(const char *path, char *ostr, int olen);