diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2010-09-08 16:44:24 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2010-09-08 16:44:24 +0100 |
commit | fc850f5680f41fd09c7a6d6fee872f889be43043 (patch) | |
tree | 12ced78d53498a6261efe59ac48dfd551be89127 /tools/libxl/libxl_internal.c | |
parent | 0953a577a26adc935177c21115296a3637b3e0e4 (diff) | |
download | xen-fc850f5680f41fd09c7a6d6fee872f889be43043.tar.gz xen-fc850f5680f41fd09c7a6d6fee872f889be43043.tar.bz2 xen-fc850f5680f41fd09c7a6d6fee872f889be43043.zip |
libxl: Ensure all _hidden functions use libxl__ prefix (autogenerated patch)
This patch covers all those which could be trivially converted automatically.
sed -n -e 's/_hidden.*[ \*]libxl_\([^_][^()]*\)(.*/\1/pg' tools/libxl/*.h | \
while read i ; do \
sed -i -e "s/libxl_$i/libxl__$i/g" tools/libxl/*.[ch]; \
done
sed -n -e 's/_hidden.*_libxl_\([^_][^()]*\)(.*/\1/pg' tools/libxl/*.h | \
while read i ; do \
sed -i -e "s/_libxl_$i/libxl__$i/g" tools/libxl/*.[ch]; \
done
Check that diffstat includes libxl but not xl.
Fixup tools/libxl/xl_cmdimpl.c which used libxl_device_del instead of
libxl_device_disk_del in a printf.
(Patch runes re-run by Ian Jackson to refresh against tip libxl.)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_internal.c')
-rw-r--r-- | tools/libxl/libxl_internal.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index 05ef3e3130..7ba9f38e07 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -29,12 +29,12 @@ #include "libxl_internal.h" #include "libxl_utils.h" -int libxl_error_set(libxl_ctx *ctx, int code) +int libxl__error_set(libxl_ctx *ctx, int code) { return 0; } -int libxl_ptr_add(libxl_gc *gc, void *ptr) +int libxl__ptr_add(libxl_gc *gc, void *ptr) { int i; void **re; @@ -65,7 +65,7 @@ int libxl_ptr_add(libxl_gc *gc, void *ptr) return 0; } -void libxl_free_all(libxl_gc *gc) +void libxl__free_all(libxl_gc *gc) { void *ptr; int i; @@ -78,31 +78,31 @@ void libxl_free_all(libxl_gc *gc) free(gc->alloc_ptrs); } -void *libxl_zalloc(libxl_gc *gc, int bytes) +void *libxl__zalloc(libxl_gc *gc, int bytes) { void *ptr = calloc(bytes, 1); if (!ptr) { - libxl_error_set(libxl_gc_owner(gc), ENOMEM); + libxl__error_set(libxl_gc_owner(gc), ENOMEM); return NULL; } - libxl_ptr_add(gc, ptr); + libxl__ptr_add(gc, ptr); return ptr; } -void *libxl_calloc(libxl_gc *gc, size_t nmemb, size_t size) +void *libxl__calloc(libxl_gc *gc, size_t nmemb, size_t size) { void *ptr = calloc(nmemb, size); if (!ptr) { - libxl_error_set(libxl_gc_owner(gc), ENOMEM); + libxl__error_set(libxl_gc_owner(gc), ENOMEM); return NULL; } - libxl_ptr_add(gc, ptr); + libxl__ptr_add(gc, ptr); return ptr; } -char *libxl_sprintf(libxl_gc *gc, const char *fmt, ...) +char *libxl__sprintf(libxl_gc *gc, const char *fmt, ...) { char *s; va_list ap; @@ -116,7 +116,7 @@ char *libxl_sprintf(libxl_gc *gc, const char *fmt, ...) return NULL; } - s = libxl_zalloc(gc, ret + 1); + s = libxl__zalloc(gc, ret + 1); if (s) { va_start(ap, fmt); ret = vsnprintf(s, ret + 1, fmt, ap); @@ -125,20 +125,20 @@ char *libxl_sprintf(libxl_gc *gc, const char *fmt, ...) return s; } -char *libxl_strdup(libxl_gc *gc, const char *c) +char *libxl__strdup(libxl_gc *gc, const char *c) { char *s = strdup(c); if (s) - libxl_ptr_add(gc, s); + libxl__ptr_add(gc, s); return s; } -char *libxl_dirname(libxl_gc *gc, const char *s) +char *libxl__dirname(libxl_gc *gc, const char *s) { char *c; - char *ptr = libxl_strdup(gc, s); + char *ptr = libxl__strdup(gc, s); c = strrchr(ptr, '/'); if (!c) @@ -184,11 +184,11 @@ void xl_log(libxl_ctx *ctx, xentoollog_level msglevel, int errnoval, va_end(ap); } -char *libxl_abs_path(libxl_gc *gc, char *s, const char *path) +char *libxl__abs_path(libxl_gc *gc, char *s, const char *path) { if (!s || s[0] == '/') return s; - return libxl_sprintf(gc, "%s/%s", path, s); + return libxl__sprintf(gc, "%s/%s", path, s); } |