From 1f56debfcfdc35d6b0e7fec469dba0598d7f1901 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Tue, 16 Mar 2010 11:18:51 +0000 Subject: [PATCH] guestfs.h: Move some internal functions to the internal header. Functions like guestfs__send were never exported through the public API (libguestfs.syms prevented that). However they appeared in the public header. Move them to the internal header. --- src/guestfs-internal.h | 16 ++++++++++++++++ src/guestfs.h | 15 --------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index aa78c3a..be71e01 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -29,4 +29,20 @@ #define STRCASENEQLEN(a,b,n) (strncasecmp((a),(b),(n)) != 0) #define STRPREFIX(a,b) (strncmp((a),(b),strlen((b))) == 0) +struct guestfs_message_header; +struct guestfs_message_error; +extern void guestfs_error (guestfs_h *g, const char *fs, ...) + __attribute__((format (printf,2,3))); +extern void guestfs_perrorf (guestfs_h *g, const char *fs, ...) + __attribute__((format (printf,2,3))); +extern void *guestfs_safe_realloc (guestfs_h *g, void *ptr, int nbytes); +extern char *guestfs_safe_strdup (guestfs_h *g, const char *str); +extern void *guestfs_safe_memdup (guestfs_h *g, void *ptr, size_t size); +extern int guestfs___set_busy (guestfs_h *g); +extern int guestfs___end_busy (guestfs_h *g); +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); + #endif /* GUESTFS_INTERNAL_H_ */ diff --git a/src/guestfs.h b/src/guestfs.h index 3d0ea32..5e0ae43 100644 --- a/src/guestfs.h +++ b/src/guestfs.h @@ -68,23 +68,8 @@ extern void guestfs_set_launch_done_callback (guestfs_h *g, guestfs_launch_done_ * change at any time! We export them because they are used by some * of the language bindings. */ -struct guestfs_message_header; -struct guestfs_message_error; -extern void guestfs_error (guestfs_h *g, const char *fs, ...) - __attribute__((format (printf,2,3))); -extern void guestfs_perrorf (guestfs_h *g, const char *fs, ...) - __attribute__((format (printf,2,3))); extern void *guestfs_safe_malloc (guestfs_h *g, size_t nbytes); extern void *guestfs_safe_calloc (guestfs_h *g, size_t n, size_t s); -extern void *guestfs_safe_realloc (guestfs_h *g, void *ptr, int nbytes); -extern char *guestfs_safe_strdup (guestfs_h *g, const char *str); -extern void *guestfs_safe_memdup (guestfs_h *g, void *ptr, size_t size); -extern int guestfs___set_busy (guestfs_h *g); -extern int guestfs___end_busy (guestfs_h *g); -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); /* End of private functions. */ #ifdef __cplusplus -- 1.8.3.1