qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] rename qemu_socket.h to qemu-socket.h for consisten


From: Chih-Min Chao
Subject: [Qemu-devel] [PATCH] rename qemu_socket.h to qemu-socket.h for consistency
Date: Mon, 28 Jun 2010 23:25:04 +0800

Signed-off-by: Chih-Min Chao <address@hidden>
---
 aio.c            |    2 +-
 gdbstub.c        |    2 +-
 hw/lance.c       |    2 +-
 hw/pcnet.c       |    2 +-
 hw/virtio-9p.c   |    2 +-
 migration-exec.c |    2 +-
 migration-fd.c   |    4 +-
 migration-tcp.c  |    2 +-
 migration-unix.c |    2 +-
 migration.c      |    2 +-
 nbd.c            |    2 +-
 net.c            |    2 +-
 net/slirp.c      |    2 +-
 net/socket.c     |    2 +-
 osdep.c          |    2 +-
 qemu-char.c      |    2 +-
 qemu-socket.h    |   61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 qemu-sockets.c   |    2 +-
 qemu_socket.h    |   61 ------------------------------------------------------
 savevm.c         |    2 +-
 vl.c             |    2 +-
 vnc-tls.c        |    2 +-
 vnc.c            |    2 +-
 23 files changed, 83 insertions(+), 83 deletions(-)
 create mode 100644 qemu-socket.h
 delete mode 100644 qemu_socket.h

diff --git a/aio.c b/aio.c
index 2f08655..9d260d3 100644
--- a/aio.c
+++ b/aio.c
@@ -14,7 +14,7 @@
 #include "qemu-common.h"
 #include "block.h"
 #include "qemu-queue.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 
 typedef struct AioHandler AioHandler;
 
diff --git a/gdbstub.c b/gdbstub.c
index c1852c2..7eda76b 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -37,7 +37,7 @@
 
 #define MAX_PACKET_LENGTH 4096
 
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "kvm.h"
 
 
diff --git a/hw/lance.c b/hw/lance.c
index b6b04dd..a8ed73d 100644
--- a/hw/lance.c
+++ b/hw/lance.c
@@ -38,7 +38,7 @@
 #include "sysbus.h"
 #include "net.h"
 #include "qemu-timer.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "sun4m.h"
 
 #include "pcnet.h"
diff --git a/hw/pcnet.c b/hw/pcnet.c
index 5e63eb5..791b5db 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -39,7 +39,7 @@
 #include "net.h"
 #include "loader.h"
 #include "qemu-timer.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 
 #include "pcnet.h"
 
diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index f8c85c3..683452b 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -13,7 +13,7 @@
 
 #include "virtio.h"
 #include "pc.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "virtio-9p.h"
 #include "fsdev/qemu-fsdev.h"
 #include "virtio-9p-debug.h"
diff --git a/migration-exec.c b/migration-exec.c
index 14718dd..2504f7a 100644
--- a/migration-exec.c
+++ b/migration-exec.c
@@ -14,7 +14,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "migration.h"
 #include "qemu-char.h"
 #include "sysemu.h"
diff --git a/migration-fd.c b/migration-fd.c
index 6d14505..564adf9 100644
--- a/migration-fd.c
+++ b/migration-fd.c
@@ -12,14 +12,14 @@
  */
 
 #include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "migration.h"
 #include "monitor.h"
 #include "qemu-char.h"
 #include "sysemu.h"
 #include "buffered_file.h"
 #include "block.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 
 //#define DEBUG_MIGRATION_FD
 
diff --git a/migration-tcp.c b/migration-tcp.c
index 78b56dc..aefefa9 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -12,7 +12,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "migration.h"
 #include "qemu-char.h"
 #include "sysemu.h"
diff --git a/migration-unix.c b/migration-unix.c
index 57232c0..52471fa 100644
--- a/migration-unix.c
+++ b/migration-unix.c
@@ -12,7 +12,7 @@
  */
 
 #include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "migration.h"
 #include "qemu-char.h"
 #include "sysemu.h"
diff --git a/migration.c b/migration.c
index b49964c..0ddc175 100644
--- a/migration.c
+++ b/migration.c
@@ -17,7 +17,7 @@
 #include "buffered_file.h"
 #include "sysemu.h"
 #include "block.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "block-migration.h"
 #include "qemu-objects.h"
 
diff --git a/nbd.c b/nbd.c
index a9f295f..df5eb95 100644
--- a/nbd.c
+++ b/nbd.c
@@ -29,7 +29,7 @@
 #include <ctype.h>
 #include <inttypes.h>
 
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 
 //#define DEBUG_NBD
 
diff --git a/net.c b/net.c
index 0703698..7d4404e 100644
--- a/net.c
+++ b/net.c
@@ -34,7 +34,7 @@
 #include "monitor.h"
 #include "sysemu.h"
 #include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "hw/qdev.h"
 
 static QTAILQ_HEAD(, VLANState) vlans;
diff --git a/net/slirp.c b/net/slirp.c
index b41c60a..7bb7312 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -31,7 +31,7 @@
 #include "net.h"
 #include "monitor.h"
 #include "sysemu.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "slirp/libslirp.h"
 
 static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
diff --git a/net/socket.c b/net/socket.c
index 1c4e153..422c58a 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -30,7 +30,7 @@
 #include "qemu-common.h"
 #include "qemu-error.h"
 #include "qemu-option.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 
 typedef struct NetSocketState {
     VLANClientState nc;
diff --git a/osdep.c b/osdep.c
index dbf872a..25e6c07 100644
--- a/osdep.c
+++ b/osdep.c
@@ -51,7 +51,7 @@
 
 #include "qemu-common.h"
 #include "sysemu.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 
 #if !defined(_POSIX_C_SOURCE) || defined(_WIN32) || defined(__sun__)
 static void *oom_check(void *ptr)
diff --git a/qemu-char.c b/qemu-char.c
index 9b69d92..fb77d9f 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -96,7 +96,7 @@
 #endif
 #endif
 
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 
 #define READ_BUF_LEN 4096
 
diff --git a/qemu-socket.h b/qemu-socket.h
new file mode 100644
index 0000000..164ae3e
--- /dev/null
+++ b/qemu-socket.h
@@ -0,0 +1,61 @@
+/* headers to use the BSD sockets */
+#ifndef QEMU_SOCKET_H
+#define QEMU_SOCKET_H
+
+#ifdef _WIN32
+#include <windows.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+#define socket_error() WSAGetLastError()
+#undef EINTR
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#define EINTR       WSAEINTR
+#define EINPROGRESS WSAEINPROGRESS
+
+int inet_aton(const char *cp, struct in_addr *ia);
+
+#else
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <sys/un.h>
+
+#define socket_error() errno
+#define closesocket(s) close(s)
+
+#endif /* !_WIN32 */
+
+#include "qemu-option.h"
+
+/* misc helpers */
+int qemu_socket(int domain, int type, int protocol);
+int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
+void socket_set_nonblock(int fd);
+int send_all(int fd, const void *buf, int len1);
+
+/* New, ipv6-ready socket helper functions, see qemu-sockets.c */
+int inet_listen_opts(QemuOpts *opts, int port_offset);
+int inet_listen(const char *str, char *ostr, int olen,
+                int socktype, int port_offset);
+int inet_connect_opts(QemuOpts *opts);
+int inet_connect(const char *str, int socktype);
+int inet_dgram_opts(QemuOpts *opts);
+const char *inet_strfamily(int family);
+
+int unix_listen_opts(QemuOpts *opts);
+int unix_listen(const char *path, char *ostr, int olen);
+int unix_connect_opts(QemuOpts *opts);
+int unix_connect(const char *path);
+
+/* Old, ipv4 only bits.  Don't use for new code. */
+int parse_host_port(struct sockaddr_in *saddr, const char *str);
+int parse_host_src_port(struct sockaddr_in *haddr,
+                        struct sockaddr_in *saddr,
+                        const char *str);
+int socket_init(void);
+
+#endif /* QEMU_SOCKET_H */
diff --git a/qemu-sockets.c b/qemu-sockets.c
index c526324..45219fc 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -19,7 +19,7 @@
 #include <errno.h>
 #include <unistd.h>
 
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "qemu-common.h" /* for qemu_isdigit */
 
 #ifndef AI_ADDRCONFIG
diff --git a/qemu_socket.h b/qemu_socket.h
deleted file mode 100644
index 164ae3e..0000000
--- a/qemu_socket.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* headers to use the BSD sockets */
-#ifndef QEMU_SOCKET_H
-#define QEMU_SOCKET_H
-
-#ifdef _WIN32
-#include <windows.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-
-#define socket_error() WSAGetLastError()
-#undef EINTR
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#define EINTR       WSAEINTR
-#define EINPROGRESS WSAEINPROGRESS
-
-int inet_aton(const char *cp, struct in_addr *ia);
-
-#else
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <sys/un.h>
-
-#define socket_error() errno
-#define closesocket(s) close(s)
-
-#endif /* !_WIN32 */
-
-#include "qemu-option.h"
-
-/* misc helpers */
-int qemu_socket(int domain, int type, int protocol);
-int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
-void socket_set_nonblock(int fd);
-int send_all(int fd, const void *buf, int len1);
-
-/* New, ipv6-ready socket helper functions, see qemu-sockets.c */
-int inet_listen_opts(QemuOpts *opts, int port_offset);
-int inet_listen(const char *str, char *ostr, int olen,
-                int socktype, int port_offset);
-int inet_connect_opts(QemuOpts *opts);
-int inet_connect(const char *str, int socktype);
-int inet_dgram_opts(QemuOpts *opts);
-const char *inet_strfamily(int family);
-
-int unix_listen_opts(QemuOpts *opts);
-int unix_listen(const char *path, char *ostr, int olen);
-int unix_connect_opts(QemuOpts *opts);
-int unix_connect(const char *path);
-
-/* Old, ipv4 only bits.  Don't use for new code. */
-int parse_host_port(struct sockaddr_in *saddr, const char *str);
-int parse_host_src_port(struct sockaddr_in *haddr,
-                        struct sockaddr_in *saddr,
-                        const char *str);
-int socket_init(void);
-
-#endif /* QEMU_SOCKET_H */
diff --git a/savevm.c b/savevm.c
index 20354a8..94d004c 100644
--- a/savevm.c
+++ b/savevm.c
@@ -80,7 +80,7 @@
 #include "blockdev.h"
 #include "audio/audio.h"
 #include "migration.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "qemu-queue.h"
 
 /* point to the block driver where the snapshots are managed */
diff --git a/vl.c b/vl.c
index 920717a..cf4997e 100644
--- a/vl.c
+++ b/vl.c
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
 
 #include "disas.h"
 
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 
 #include "slirp/libslirp.h"
 
diff --git a/vnc-tls.c b/vnc-tls.c
index dec626c..50d2ed6 100644
--- a/vnc-tls.c
+++ b/vnc-tls.c
@@ -26,7 +26,7 @@
 
 #include "qemu-x509.h"
 #include "vnc.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 
 #if defined(_VNC_DEBUG) && _VNC_DEBUG >= 2
 /* Very verbose, so only enabled for _VNC_DEBUG >= 2 */
diff --git a/vnc.c b/vnc.c
index ed0e096..e874517 100644
--- a/vnc.c
+++ b/vnc.c
@@ -26,7 +26,7 @@
 
 #include "vnc.h"
 #include "sysemu.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
 #include "qemu-timer.h"
 #include "acl.h"
 #include "qemu-objects.h"
-- 
1.7.0.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]