summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-07-28 12:38:36 +0100
committerRichard Jones <rjones@redhat.com>2010-07-28 12:41:29 +0100
commit737181bcd7b1de8c3a613d6282030c34efa78fb6 (patch)
tree2c0c2c5607a6fd2ef98a46eba0d4a70b8fed3438
parent41f25ab3df5f306ac717fa7a6efd58328d30c1ae (diff)
downloadlibguestfs-737181bcd7b1de8c3a613d6282030c34efa78fb6.tar.gz
libguestfs-737181bcd7b1de8c3a613d6282030c34efa78fb6.tar.xz
libguestfs-737181bcd7b1de8c3a613d6282030c34efa78fb6.zip
Rename internal functions.
This is an update to commit 41f25ab3df5f306ac717fa7a6efd58328d30c1ae. Internal functions should be named guestfs___* (3 underscores) to avoid clashing with the implementation of actions (2 underscores).
-rw-r--r--src/guestfs-internal.h6
-rw-r--r--src/launch.c4
-rw-r--r--src/proto.c14
3 files changed, 12 insertions, 12 deletions
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index d283d7c4..12ca0ecf 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -148,9 +148,9 @@ extern int guestfs___send (guestfs_h *g, int proc_nr, xdrproc_t xdrp, char *args
extern int guestfs___recv (guestfs_h *g, const char *fn, struct guestfs_message_header *hdr, struct guestfs_message_error *err, xdrproc_t xdrp, char *ret);
extern int guestfs___send_file (guestfs_h *g, const char *filename);
extern int guestfs___recv_file (guestfs_h *g, const char *filename);
-extern int guestfs__send_to_daemon (guestfs_h *g, const void *v_buf, size_t n);
-extern int guestfs__recv_from_daemon (guestfs_h *g, uint32_t *size_rtn, void **buf_rtn);
-extern int guestfs__accept_from_daemon (guestfs_h *g);
+extern int guestfs___send_to_daemon (guestfs_h *g, const void *v_buf, size_t n);
+extern int guestfs___recv_from_daemon (guestfs_h *g, uint32_t *size_rtn, void **buf_rtn);
+extern int guestfs___accept_from_daemon (guestfs_h *g);
#define error guestfs_error
#define perrorf guestfs_perrorf
diff --git a/src/launch.c b/src/launch.c
index 7cd5a561..0d7a3f34 100644
--- a/src/launch.c
+++ b/src/launch.c
@@ -750,7 +750,7 @@ guestfs__launch (guestfs_h *g)
* from our UID) for security reasons.
*/
while (sock == -1) {
- sock = guestfs__accept_from_daemon (g);
+ sock = guestfs___accept_from_daemon (g);
if (sock == -1)
goto cleanup1;
@@ -826,7 +826,7 @@ guestfs__launch (guestfs_h *g)
*/
uint32_t size;
void *buf = NULL;
- r = guestfs__recv_from_daemon (g, &size, &buf);
+ r = guestfs___recv_from_daemon (g, &size, &buf);
free (buf);
if (r == -1) return -1;
diff --git a/src/proto.c b/src/proto.c
index fc1fedc3..ad173c6b 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -299,7 +299,7 @@ check_for_daemon_cancellation_or_eof (guestfs_h *g, int fd)
* child_cleanup function above.
*/
int
-guestfs__send_to_daemon (guestfs_h *g, const void *v_buf, size_t n)
+guestfs___send_to_daemon (guestfs_h *g, const void *v_buf, size_t n)
{
const char *buf = v_buf;
fd_set rset, rset2;
@@ -375,7 +375,7 @@ guestfs__send_to_daemon (guestfs_h *g, const void *v_buf, size_t n)
* child_cleanup function above.
*/
int
-guestfs__recv_from_daemon (guestfs_h *g, uint32_t *size_rtn, void **buf_rtn)
+guestfs___recv_from_daemon (guestfs_h *g, uint32_t *size_rtn, void **buf_rtn)
{
fd_set rset, rset2;
@@ -533,7 +533,7 @@ guestfs__recv_from_daemon (guestfs_h *g, uint32_t *size_rtn, void **buf_rtn)
* accepted socket.
*/
int
-guestfs__accept_from_daemon (guestfs_h *g)
+guestfs___accept_from_daemon (guestfs_h *g)
{
fd_set rset, rset2;
@@ -646,7 +646,7 @@ guestfs___send (guestfs_h *g, int proc_nr, xdrproc_t xdrp, char *args)
xdr_uint32_t (&xdr, &len);
again:
- r = guestfs__send_to_daemon (g, msg_out, msg_out_size);
+ r = guestfs___send_to_daemon (g, msg_out, msg_out_size);
if (r == -2) /* Ignore stray daemon cancellations. */
goto again;
if (r == -1)
@@ -790,7 +790,7 @@ send_file_chunk (guestfs_h *g, int cancel, const char *buf, size_t buflen)
xdrmem_create (&xdr, msg_out, 4, XDR_ENCODE);
xdr_uint32_t (&xdr, &len);
- r = guestfs__send_to_daemon (g, msg_out, msg_out_size);
+ r = guestfs___send_to_daemon (g, msg_out, msg_out_size);
/* Did the daemon send a cancellation message? */
if (r == -2) {
@@ -824,7 +824,7 @@ guestfs___recv (guestfs_h *g, const char *fn,
int r;
again:
- r = guestfs__recv_from_daemon (g, &size, &buf);
+ r = guestfs___recv_from_daemon (g, &size, &buf);
if (r == -1)
return -1;
@@ -946,7 +946,7 @@ receive_file_data (guestfs_h *g, void **buf_r)
XDR xdr;
guestfs_chunk chunk;
- r = guestfs__recv_from_daemon (g, &len, &buf);
+ r = guestfs___recv_from_daemon (g, &len, &buf);
if (r == -1) {
error (g, _("receive_file_data: parse error in reply callback"));
return -1;