[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 3/7] net: enlarge connect_to_addr() scope
From: |
Liu Yuan |
Subject: |
[Qemu-devel] [PATCH v2 3/7] net: enlarge connect_to_addr() scope |
Date: |
Fri, 29 Mar 2013 13:42:20 +0800 |
From: Liu Yuan <address@hidden>
This is a prepare patch.
Signed-off-by: Liu Yuan <address@hidden>
---
include/net.h | 8 ++++++++
sheep/sockfd_cache.c | 8 --------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/net.h b/include/net.h
index a68c880..75ac197 100644
--- a/include/net.h
+++ b/include/net.h
@@ -72,4 +72,12 @@ int set_rcv_timeout(int fd);
int get_local_addr(uint8_t *bytes);
bool inetaddr_is_valid(char *addr);
+static inline int connect_to_addr(const uint8_t *addr, int port)
+{
+ char name[INET6_ADDRSTRLEN];
+
+ addr_to_str(name, sizeof(name), addr, 0);
+ return connect_to(name, port);
+}
+
#endif
diff --git a/sheep/sockfd_cache.c b/sheep/sockfd_cache.c
index ddefbf2..1e0d6cf 100644
--- a/sheep/sockfd_cache.c
+++ b/sheep/sockfd_cache.c
@@ -337,14 +337,6 @@ static inline void check_idx(int idx)
queue_work(sys->sockfd_wqueue, w);
}
-static inline int connect_to_addr(const uint8_t *addr, int port)
-{
- char name[INET6_ADDRSTRLEN];
-
- addr_to_str(name, sizeof(name), addr, 0);
- return connect_to(name, port);
-}
-
/* Add the node back if it is still alive */
static inline int revalidate_node(const struct node_id *nid)
{
--
1.7.9.5
- [Qemu-devel] [PATCH v2 0/7] md: add hot-plug and hot-unplug support, Liu Yuan, 2013/03/29
- [Qemu-devel] [PATCH v2 1/7] md: add support for simultaneous disk failure on the same node, Liu Yuan, 2013/03/29
- [Qemu-devel] [PATCH v2 2/7] tests/055: test simultaneous multiple disk failures on the same node, Liu Yuan, 2013/03/29
- [Qemu-devel] [PATCH v2 3/7] net: enlarge connect_to_addr() scope,
Liu Yuan <=
- [Qemu-devel] [PATCH v2 4/7] md: add hot-plug and hot-unplug support, Liu Yuan, 2013/03/29
- [Qemu-devel] [PATCH v2 5/7] collie: add new commands to manipulate multi-disks, Liu Yuan, 2013/03/29
- [Qemu-devel] [PATCH v2 6/7] sheep: remove duplicate recovery complete notification, Liu Yuan, 2013/03/29
- [Qemu-devel] [PATCH v2 7/7] tsets: add 057 to test md hot-plug and hot-unplug, Liu Yuan, 2013/03/29
- Re: [Qemu-devel] [PATCH v2 0/7] md: add hot-plug and hot-unplug support, Liu Yuan, 2013/03/29