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
* 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;
*/
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;
* 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;
* 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;
* accepted socket.
*/
int
-guestfs__accept_from_daemon (guestfs_h *g)
+guestfs___accept_from_daemon (guestfs_h *g)
{
fd_set rset, rset2;
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)
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) {
int r;
again:
- r = guestfs__recv_from_daemon (g, &size, &buf);
+ r = guestfs___recv_from_daemon (g, &size, &buf);
if (r == -1)
return -1;
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;