debuggers.hg

changeset 22167:4ed9f9218620

libxl: Use libxl__ namespace for internal types

It's not clear that the namespace rules described in libxl.h are
intended to apply to internal types but I don't see why not.

sed -i -e 's/\<libxl_device\>/libxl__device/g' tools/libxl/*.[ch]
sed -i -e 's/\<libxl_device_kinds\>/libxl__device_kinds/g' tools/libxl/*.[ch]
sed -i -e 's/\<libxl_gc\>/libxl__gc/g' tools/libxl/*.[ch]
sed -i -e 's/\<libxl_gc_owner\>/libxl__gc_owner/g' tools/libxl/*.[ch]
sed -i -e 's/\<libxl_spawn_starting\>/libxl__spawn_starting/g' tools/libxl/*.[ch]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Ian Campbell <ian.campbell@citrix.com>
date Wed Sep 08 16:48:48 2010 +0100 (2010-09-08)
parents bd331cd1e704
children e14a3c281982
files tools/libxl/libxl.c tools/libxl/libxl.h tools/libxl/libxl_blktap2.c tools/libxl/libxl_bootloader.c tools/libxl/libxl_device.c tools/libxl/libxl_dom.c tools/libxl/libxl_exec.c tools/libxl/libxl_internal.c tools/libxl/libxl_internal.h tools/libxl/libxl_noblktap2.c tools/libxl/libxl_pci.c tools/libxl/libxl_utils.c tools/libxl/libxl_xshelp.c
line diff
     1.1 --- a/tools/libxl/libxl.c	Wed Sep 08 16:47:32 2010 +0100
     1.2 +++ b/tools/libxl/libxl.c	Wed Sep 08 16:48:48 2010 +0100
     1.3 @@ -107,7 +107,7 @@ void libxl_key_value_list_destroy(libxl_
     1.4  int libxl_domain_make(libxl_ctx *ctx, libxl_domain_create_info *info,
     1.5                         uint32_t *domid)
     1.6  {
     1.7 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
     1.8 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
     1.9      int flags, ret, i, rc;
    1.10      char *uuid_string;
    1.11      char *rw_paths[] = { "device", "device/suspend/event-channel" , "data"};
    1.12 @@ -217,7 +217,7 @@ int libxl_domain_rename(libxl_ctx *ctx, 
    1.13                          const char *old_name, const char *new_name,
    1.14                          xs_transaction_t trans)
    1.15  {
    1.16 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    1.17 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    1.18      char *dom_path = 0;
    1.19      const char *name_path;
    1.20      char *got_old_name;
    1.21 @@ -295,7 +295,7 @@ int libxl_domain_rename(libxl_ctx *ctx, 
    1.22  
    1.23  int libxl_domain_build(libxl_ctx *ctx, libxl_domain_build_info *info, uint32_t domid, libxl_domain_build_state *state)
    1.24  {
    1.25 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    1.26 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    1.27      char **vments = NULL, **localents = NULL;
    1.28      struct timeval start_time;
    1.29      int i, ret;
    1.30 @@ -354,7 +354,7 @@ int libxl_domain_restore(libxl_ctx *ctx,
    1.31                           uint32_t domid, int fd, libxl_domain_build_state *state,
    1.32                           libxl_device_model_info *dm_info)
    1.33  {
    1.34 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    1.35 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    1.36      char **vments = NULL, **localents = NULL;
    1.37      struct timeval start_time;
    1.38      int i, ret, esave, flags;
    1.39 @@ -430,7 +430,7 @@ out:
    1.40  
    1.41  int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid)
    1.42  {
    1.43 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    1.44 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    1.45      int rc = 0;
    1.46  
    1.47      if (libxl__domain_is_hvm(ctx, domid)) {
    1.48 @@ -466,7 +466,7 @@ out:
    1.49  int libxl_domain_preserve(libxl_ctx *ctx, uint32_t domid,
    1.50                            libxl_domain_create_info *info, const char *name_suffix, libxl_uuid new_uuid)
    1.51  {
    1.52 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    1.53 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    1.54      struct xs_permissions roperm[2];
    1.55      xs_transaction_t t;
    1.56      char *preserved_name;
    1.57 @@ -686,7 +686,7 @@ int libxl_domain_core_dump(libxl_ctx *ct
    1.58  
    1.59  int libxl_domain_unpause(libxl_ctx *ctx, uint32_t domid)
    1.60  {
    1.61 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    1.62 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    1.63      char *path;
    1.64      char *state;
    1.65      int ret, rc = 0;
    1.66 @@ -718,7 +718,7 @@ static char *req_table[] = {
    1.67  
    1.68  int libxl_domain_shutdown(libxl_ctx *ctx, uint32_t domid, int req)
    1.69  {
    1.70 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    1.71 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    1.72      char *shutdown_path;
    1.73      char *dom_path;
    1.74  
    1.75 @@ -780,7 +780,7 @@ int libxl_wait_for_domain_death(libxl_ct
    1.76  
    1.77  int libxl_wait_for_disk_ejects(libxl_ctx *ctx, uint32_t guest_domid, libxl_device_disk *disks, int num_disks, libxl_waiter *waiter)
    1.78  {
    1.79 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    1.80 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    1.81      int i, rc = -1;
    1.82      uint32_t domid = libxl_get_stubdom_id(ctx, guest_domid);
    1.83  
    1.84 @@ -852,7 +852,7 @@ int libxl_event_get_domain_death_info(li
    1.85  
    1.86  int libxl_event_get_disk_eject_info(libxl_ctx *ctx, uint32_t domid, libxl_event *event, libxl_device_disk *disk)
    1.87  {
    1.88 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    1.89 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    1.90      char *path;
    1.91      char *backend;
    1.92      char *value;
    1.93 @@ -885,7 +885,7 @@ int libxl_event_get_disk_eject_info(libx
    1.94  
    1.95  static int libxl_destroy_device_model(libxl_ctx *ctx, uint32_t domid)
    1.96  {
    1.97 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    1.98 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    1.99      char *pid;
   1.100      int ret;
   1.101  
   1.102 @@ -921,7 +921,7 @@ out:
   1.103  
   1.104  int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid, int force)
   1.105  {
   1.106 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.107 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.108      char *dom_path;
   1.109      char *vm_path;
   1.110      int rc, dm_present;
   1.111 @@ -982,7 +982,7 @@ out:
   1.112  
   1.113  int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_console_constype type)
   1.114  {
   1.115 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.116 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.117      char *p = libxl__sprintf(&gc, "%s/xenconsole", libxl_private_bindir_path());
   1.118      char *domid_s = libxl__sprintf(&gc, "%d", domid);
   1.119      char *cons_num_s = libxl__sprintf(&gc, "%d", cons_num);
   1.120 @@ -1021,7 +1021,7 @@ int libxl_primary_console_exec(libxl_ctx
   1.121  
   1.122  int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass)
   1.123  {
   1.124 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.125 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.126      const char *vnc_port, *vfb_back;
   1.127      const char *vnc_listen = NULL, *vnc_pass = NULL;
   1.128      int port = 0, autopass_fd = -1;
   1.129 @@ -1084,7 +1084,7 @@ skip_autopass:
   1.130      return 0;
   1.131  }
   1.132  
   1.133 -static char ** libxl_build_device_model_args_old(libxl_gc *gc,
   1.134 +static char ** libxl_build_device_model_args_old(libxl__gc *gc,
   1.135                                               libxl_device_model_info *info,
   1.136                                               libxl_device_nic *vifs,
   1.137                                               int num_vifs)
   1.138 @@ -1222,7 +1222,7 @@ static char ** libxl_build_device_model_
   1.139      return (char **) flexarray_contents(dm_args);
   1.140  }
   1.141  
   1.142 -static char ** libxl_build_device_model_args_new(libxl_gc *gc,
   1.143 +static char ** libxl_build_device_model_args_new(libxl__gc *gc,
   1.144                                               libxl_device_model_info *info,
   1.145                                               libxl_device_nic *vifs,
   1.146                                               int num_vifs)
   1.147 @@ -1350,7 +1350,7 @@ static char ** libxl_build_device_model_
   1.148      else
   1.149          flexarray_set(dm_args, num++, "xenfv");
   1.150  
   1.151 -    disks = libxl_device_disk_list(libxl_gc_owner(gc), info->domid, &nb);
   1.152 +    disks = libxl_device_disk_list(libxl__gc_owner(gc), info->domid, &nb);
   1.153      for (i; i < nb; i++) {
   1.154          if ( disks[i].is_cdrom ) {
   1.155              flexarray_set(dm_args, num++, "-cdrom");
   1.156 @@ -1366,12 +1366,12 @@ static char ** libxl_build_device_model_
   1.157      return (char **) flexarray_contents(dm_args);
   1.158  }
   1.159  
   1.160 -static char ** libxl_build_device_model_args(libxl_gc *gc,
   1.161 +static char ** libxl_build_device_model_args(libxl__gc *gc,
   1.162                                               libxl_device_model_info *info,
   1.163                                               libxl_device_nic *vifs,
   1.164                                               int num_vifs)
   1.165  {
   1.166 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   1.167 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   1.168      int new_qemu;
   1.169  
   1.170      new_qemu = libxl_check_device_model_version(ctx, info->device_model);
   1.171 @@ -1430,7 +1430,7 @@ static int libxl_vfb_and_vkb_from_device
   1.172  
   1.173  static int libxl_write_dmargs(libxl_ctx *ctx, int domid, int guest_domid, char **args)
   1.174  {
   1.175 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.176 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.177      int i;
   1.178      char *vm_path;
   1.179      char *dmargs, *path;
   1.180 @@ -1485,7 +1485,7 @@ static int libxl_create_stubdom(libxl_ct
   1.181                                  libxl_device_vkb *vkb,
   1.182                                  libxl_device_model_starting **starting_r)
   1.183  {
   1.184 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.185 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.186      int i, num_console = 1, ret;
   1.187      libxl_device_console *console;
   1.188      libxl_domain_create_info c_info;
   1.189 @@ -1635,7 +1635,7 @@ int libxl_create_device_model(libxl_ctx 
   1.190                                libxl_device_nic *vifs, int num_vifs,
   1.191                                libxl_device_model_starting **starting_r)
   1.192  {
   1.193 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.194 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.195      char *path, *logfile;
   1.196      int logfile_w, null;
   1.197      int rc;
   1.198 @@ -1675,7 +1675,7 @@ int libxl_create_device_model(libxl_ctx 
   1.199          if (!*starting_r)
   1.200              goto out_close;
   1.201          p = *starting_r;
   1.202 -        p->for_spawn = calloc(sizeof(libxl_spawn_starting), 1);
   1.203 +        p->for_spawn = calloc(sizeof(libxl__spawn_starting), 1);
   1.204      } else {
   1.205          p = &buf_starting;
   1.206          p->for_spawn = NULL;
   1.207 @@ -1753,14 +1753,14 @@ int libxl_confirm_device_model_startup(l
   1.208  
   1.209  int libxl_device_disk_add(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk)
   1.210  {
   1.211 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.212 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.213      flexarray_t *front;
   1.214      flexarray_t *back;
   1.215      char *backend_type;
   1.216      unsigned int boffset = 0;
   1.217      unsigned int foffset = 0;
   1.218      int devid;
   1.219 -    libxl_device device;
   1.220 +    libxl__device device;
   1.221      int major, minor, rc;
   1.222  
   1.223      front = flexarray_make(16, 1);
   1.224 @@ -1889,7 +1889,7 @@ out:
   1.225  int libxl_device_disk_del(libxl_ctx *ctx, 
   1.226                            libxl_device_disk *disk, int wait)
   1.227  {
   1.228 -    libxl_device device;
   1.229 +    libxl__device device;
   1.230      int devid;
   1.231  
   1.232      devid = libxl__device_disk_dev_number(disk->virtpath);
   1.233 @@ -1905,7 +1905,7 @@ int libxl_device_disk_del(libxl_ctx *ctx
   1.234  
   1.235  char * libxl_device_disk_local_attach(libxl_ctx *ctx, libxl_device_disk *disk)
   1.236  {
   1.237 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.238 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.239      const char *dev = NULL;
   1.240      char *ret;
   1.241      int phystype = disk->phystype;
   1.242 @@ -1950,12 +1950,12 @@ int libxl_device_disk_local_detach(libxl
   1.243  /******************************************************************************/
   1.244  int libxl_device_nic_add(libxl_ctx *ctx, uint32_t domid, libxl_device_nic *nic)
   1.245  {
   1.246 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.247 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.248      flexarray_t *front;
   1.249      flexarray_t *back;
   1.250      unsigned int boffset = 0;
   1.251      unsigned int foffset = 0;
   1.252 -    libxl_device device;
   1.253 +    libxl__device device;
   1.254      char *dompath, **l;
   1.255      unsigned int nb, rc;
   1.256  
   1.257 @@ -2039,7 +2039,7 @@ out:
   1.258  int libxl_device_nic_del(libxl_ctx *ctx, 
   1.259                           libxl_device_nic *nic, int wait)
   1.260  {
   1.261 -    libxl_device device;
   1.262 +    libxl__device device;
   1.263  
   1.264      device.backend_devid    = nic->devid;
   1.265      device.backend_domid    = nic->backend_domid;
   1.266 @@ -2053,7 +2053,7 @@ int libxl_device_nic_del(libxl_ctx *ctx,
   1.267  
   1.268  libxl_nicinfo *libxl_list_nics(libxl_ctx *ctx, uint32_t domid, unsigned int *nb)
   1.269  {
   1.270 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.271 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.272      char *dompath, *nic_path_fe;
   1.273      char **l, **list;
   1.274      char *val, *tok;
   1.275 @@ -2110,10 +2110,10 @@ err:
   1.276  /******************************************************************************/
   1.277  int libxl_device_net2_add(libxl_ctx *ctx, uint32_t domid, libxl_device_net2 *net2)
   1.278  {
   1.279 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.280 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.281      flexarray_t *front, *back;
   1.282      unsigned int boffset = 0, foffset = 0;
   1.283 -    libxl_device device;
   1.284 +    libxl__device device;
   1.285      char *dompath, *dom, **l;
   1.286      unsigned int nb;
   1.287      int rc;
   1.288 @@ -2223,7 +2223,7 @@ err:
   1.289  
   1.290  libxl_net2info *libxl_device_net2_list(libxl_ctx *ctx, uint32_t domid, unsigned int *nb)
   1.291  {
   1.292 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.293 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.294      char *dompath, *net2_path_fe;
   1.295      char **l;
   1.296      char *val, *tok;
   1.297 @@ -2284,7 +2284,7 @@ err:
   1.298  
   1.299  int libxl_device_net2_del(libxl_ctx *ctx, libxl_device_net2 *net2, int wait)
   1.300  {
   1.301 -    libxl_device device;
   1.302 +    libxl__device device;
   1.303  
   1.304      device.backend_devid    = net2->devid;
   1.305      device.backend_domid    = net2->backend_domid;
   1.306 @@ -2300,12 +2300,12 @@ int libxl_device_net2_del(libxl_ctx *ctx
   1.307  /******************************************************************************/
   1.308  int libxl_device_console_add(libxl_ctx *ctx, uint32_t domid, libxl_device_console *console)
   1.309  {
   1.310 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.311 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.312      flexarray_t *front;
   1.313      flexarray_t *back;
   1.314      unsigned int boffset = 0;
   1.315      unsigned int foffset = 0;
   1.316 -    libxl_device device;
   1.317 +    libxl__device device;
   1.318      int rc;
   1.319  
   1.320      if (console->build_state) {
   1.321 @@ -2396,12 +2396,12 @@ out:
   1.322  /******************************************************************************/
   1.323  int libxl_device_vkb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vkb *vkb)
   1.324  {
   1.325 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.326 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.327      flexarray_t *front;
   1.328      flexarray_t *back;
   1.329      unsigned int boffset = 0;
   1.330      unsigned int foffset = 0;
   1.331 -    libxl_device device;
   1.332 +    libxl__device device;
   1.333      int rc;
   1.334  
   1.335      front = flexarray_make(16, 1);
   1.336 @@ -2460,7 +2460,7 @@ int libxl_device_vkb_hard_shutdown(libxl
   1.337  
   1.338  libxl_device_disk *libxl_device_disk_list(libxl_ctx *ctx, uint32_t domid, int *num)
   1.339  {
   1.340 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.341 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.342      char *be_path_tap, *be_path_vbd;
   1.343      libxl_device_disk *dend, *disks, *ret = NULL;
   1.344      char **b, **l = NULL;
   1.345 @@ -2518,7 +2518,7 @@ libxl_device_disk *libxl_device_disk_lis
   1.346  int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t domid,
   1.347                                libxl_device_disk *disk, libxl_diskinfo *diskinfo)
   1.348  {
   1.349 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.350 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.351      char *dompath, *diskpath;
   1.352      char *val;
   1.353  
   1.354 @@ -2592,12 +2592,12 @@ out:
   1.355  }
   1.356  
   1.357  /******************************************************************************/
   1.358 -static int libxl_build_xenpv_qemu_args(libxl_gc *gc,
   1.359 +static int libxl_build_xenpv_qemu_args(libxl__gc *gc,
   1.360                                         uint32_t domid,
   1.361                                         libxl_device_vfb *vfb,
   1.362                                         libxl_device_model_info *info)
   1.363  {
   1.364 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   1.365 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   1.366      memset(info, 0x00, sizeof(libxl_device_model_info));
   1.367  
   1.368      if (vfb != NULL) {
   1.369 @@ -2624,7 +2624,7 @@ static int libxl_build_xenpv_qemu_args(l
   1.370  int libxl_create_xenpv_qemu(libxl_ctx *ctx, uint32_t domid, libxl_device_vfb *vfb,
   1.371                              libxl_device_model_starting **starting_r)
   1.372  {
   1.373 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.374 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.375      libxl_device_model_info info;
   1.376  
   1.377      libxl_build_xenpv_qemu_args(&gc, domid, vfb, &info);
   1.378 @@ -2635,12 +2635,12 @@ int libxl_create_xenpv_qemu(libxl_ctx *c
   1.379  
   1.380  int libxl_device_vfb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vfb *vfb)
   1.381  {
   1.382 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.383 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.384      flexarray_t *front;
   1.385      flexarray_t *back;
   1.386      unsigned int boffset = 0;
   1.387      unsigned int foffset = 0;
   1.388 -    libxl_device device;
   1.389 +    libxl__device device;
   1.390      int rc;
   1.391  
   1.392      front = flexarray_make(16, 1);
   1.393 @@ -2723,7 +2723,7 @@ int libxl_device_vfb_hard_shutdown(libxl
   1.394  
   1.395  int libxl_domain_setmaxmem(libxl_ctx *ctx, uint32_t domid, uint32_t max_memkb)
   1.396  {
   1.397 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.398 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.399      char *mem, *endptr;
   1.400      uint32_t memorykb;
   1.401      char *dompath = libxl__xs_get_dompath(&gc, domid);
   1.402 @@ -2756,7 +2756,7 @@ out:
   1.403  
   1.404  int libxl_set_memory_target(libxl_ctx *ctx, uint32_t domid, uint32_t target_memkb, int enforce)
   1.405  {
   1.406 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.407 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.408      int rc = 1;
   1.409      uint32_t memorykb = 0, videoram = 0;
   1.410      char *memmax, *endptr, *videoram_s = NULL;
   1.411 @@ -2959,7 +2959,7 @@ int libxl_set_vcpuaffinity(libxl_ctx *ct
   1.412  
   1.413  int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, uint32_t bitmask)
   1.414  {
   1.415 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.416 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.417      libxl_dominfo info;
   1.418      char *dompath;
   1.419      xs_transaction_t t;
   1.420 @@ -3098,7 +3098,7 @@ int libxl_send_trigger(libxl_ctx *ctx, u
   1.421  
   1.422  int libxl_send_sysrq(libxl_ctx *ctx, uint32_t domid, char sysrq)
   1.423  {
   1.424 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.425 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.426      char *dompath = libxl__xs_get_dompath(&gc, domid);
   1.427  
   1.428      libxl__xs_write(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/control/sysrq", dompath), "%c", sysrq);
   1.429 @@ -3190,7 +3190,7 @@ void libxl_xen_console_read_finish(libxl
   1.430  
   1.431  uint32_t libxl_vm_get_start_time(libxl_ctx *ctx, uint32_t domid)
   1.432  {
   1.433 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   1.434 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   1.435      char *dompath = libxl__xs_get_dompath(&gc, domid);
   1.436      char *vm_path, *start_time;
   1.437      uint32_t ret;
     2.1 --- a/tools/libxl/libxl.h	Wed Sep 08 16:47:32 2010 +0100
     2.2 +++ b/tools/libxl/libxl.h	Wed Sep 08 16:48:48 2010 +0100
     2.3 @@ -107,7 +107,7 @@
     2.4   *     should be allocated from the temporary pool.
     2.5   *
     2.6   *     Where a function's primary purpose is to return such an object,
     2.7 - *     it should have a libxl_gc * as it's first argument.
     2.8 + *     it should have a libxl__gc * as it's first argument.
     2.9   *
    2.10   *     Note that there are two ways to change an allocation from this
    2.11   *     category to the "public" category. Either the implementation
    2.12 @@ -118,7 +118,7 @@
    2.13   *     The latter method is preferred for obvious performance reasons.
    2.14   *
    2.15   * No temporary objects allocated from the pool may be explicitly freed.
    2.16 - * Therefore public functions which initialize a libxl_gc MUST call
    2.17 + * Therefore public functions which initialize a libxl__gc MUST call
    2.18   * libxl__free_all() before returning.
    2.19   */
    2.20  #ifndef LIBXL_H
     3.1 --- a/tools/libxl/libxl_blktap2.c	Wed Sep 08 16:47:32 2010 +0100
     3.2 +++ b/tools/libxl/libxl_blktap2.c	Wed Sep 08 16:48:48 2010 +0100
     3.3 @@ -18,13 +18,13 @@
     3.4  
     3.5  #include "tap-ctl.h"
     3.6  
     3.7 -int libxl__blktap_enabled(libxl_gc *gc)
     3.8 +int libxl__blktap_enabled(libxl__gc *gc)
     3.9  {
    3.10      const char *msg;
    3.11      return !tap_ctl_check(&msg);
    3.12  }
    3.13  
    3.14 -const char *libxl__blktap_devpath(libxl_gc *gc,
    3.15 +const char *libxl__blktap_devpath(libxl__gc *gc,
    3.16                                   const char *disk,
    3.17                                   libxl_disk_phystype phystype)
    3.18  {
     4.1 --- a/tools/libxl/libxl_bootloader.c	Wed Sep 08 16:47:32 2010 +0100
     4.2 +++ b/tools/libxl/libxl_bootloader.c	Wed Sep 08 16:48:48 2010 +0100
     4.3 @@ -30,7 +30,7 @@
     4.4  #define XENCONSOLED_BUF_SIZE 16
     4.5  #define BOOTLOADER_BUF_SIZE 1024
     4.6  
     4.7 -static char **make_bootloader_args(libxl_gc *gc,
     4.8 +static char **make_bootloader_args(libxl__gc *gc,
     4.9                                     libxl_domain_build_info *info,
    4.10                                     uint32_t domid,
    4.11                                     const char *fifo, char *disk)
    4.12 @@ -161,7 +161,7 @@ static pid_t fork_exec_bootloader(int *m
    4.13   * if there is actual data to write, otherwise this would loop too fast,
    4.14   * eating up CPU time.
    4.15   */
    4.16 -static char * bootloader_interact(libxl_gc *gc, int xenconsoled_fd, int bootloader_fd, int fifo_fd)
    4.17 +static char * bootloader_interact(libxl__gc *gc, int xenconsoled_fd, int bootloader_fd, int fifo_fd)
    4.18  {
    4.19      int ret;
    4.20  
    4.21 @@ -300,7 +300,7 @@ int libxl_run_bootloader(libxl_ctx *ctx,
    4.22                           libxl_device_disk *disk,
    4.23                           uint32_t domid)
    4.24  {
    4.25 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    4.26 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    4.27      int ret, rc = 0;
    4.28      char *fifo = NULL;
    4.29      char *diskpath = NULL;
     5.1 --- a/tools/libxl/libxl_device.c	Wed Sep 08 16:47:32 2010 +0100
     5.2 +++ b/tools/libxl/libxl_device.c	Wed Sep 08 16:48:48 2010 +0100
     5.3 @@ -39,10 +39,10 @@ static const char *string_of_kinds[] = {
     5.4      [DEVICE_CONSOLE] = "console",
     5.5  };
     5.6  
     5.7 -int libxl__device_generic_add(libxl_ctx *ctx, libxl_device *device,
     5.8 +int libxl__device_generic_add(libxl_ctx *ctx, libxl__device *device,
     5.9                               char **bents, char **fents)
    5.10  {
    5.11 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    5.12 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    5.13      char *dom_path_backend, *dom_path, *frontend_path, *backend_path;
    5.14      xs_transaction_t t;
    5.15      struct xs_permissions frontend_perms[2];
    5.16 @@ -228,7 +228,7 @@ int libxl__device_disk_dev_number(char *
    5.17  
    5.18  int libxl__device_destroy(libxl_ctx *ctx, char *be_path, int force)
    5.19  {
    5.20 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    5.21 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    5.22      xs_transaction_t t;
    5.23      char *state_path = libxl__sprintf(&gc, "%s/state", be_path);
    5.24      char *state = libxl__xs_read(&gc, XBT_NULL, state_path);
    5.25 @@ -264,7 +264,7 @@ out:
    5.26  
    5.27  static int wait_for_dev_destroy(libxl_ctx *ctx, struct timeval *tv)
    5.28  {
    5.29 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    5.30 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    5.31      int nfds, rc;
    5.32      unsigned int n;
    5.33      fd_set rfds;
    5.34 @@ -293,7 +293,7 @@ static int wait_for_dev_destroy(libxl_ct
    5.35  
    5.36  int libxl__devices_destroy(libxl_ctx *ctx, uint32_t domid, int force)
    5.37  {
    5.38 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    5.39 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    5.40      char *path, *be_path, *fe_path;
    5.41      unsigned int num1, num2;
    5.42      char **l1 = NULL, **l2 = NULL;
    5.43 @@ -353,9 +353,9 @@ out:
    5.44      return 0;
    5.45  }
    5.46  
    5.47 -int libxl__device_del(libxl_ctx *ctx, libxl_device *dev, int wait)
    5.48 +int libxl__device_del(libxl_ctx *ctx, libxl__device *dev, int wait)
    5.49  {
    5.50 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    5.51 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    5.52      char *dom_path_backend, *backend_path;
    5.53      int rc;
    5.54  
    5.55 @@ -393,7 +393,7 @@ int libxl__wait_for_device_model(libxl_c
    5.56                                                        void *userdata),
    5.57                                  void *check_callback_userdata)
    5.58  {
    5.59 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    5.60 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    5.61      char *path;
    5.62      char *p;
    5.63      unsigned int len;
    5.64 @@ -452,7 +452,7 @@ again:
    5.65  
    5.66  int libxl__wait_for_backend(libxl_ctx *ctx, char *be_path, char *state)
    5.67  {
    5.68 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    5.69 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    5.70      int watchdog = 100;
    5.71      unsigned int len;
    5.72      char *p;
     6.1 --- a/tools/libxl/libxl_dom.c	Wed Sep 08 16:47:32 2010 +0100
     6.2 +++ b/tools/libxl/libxl_dom.c	Wed Sep 08 16:48:48 2010 +0100
     6.3 @@ -90,7 +90,7 @@ int libxl__build_post(libxl_ctx *ctx, ui
     6.4                 libxl_domain_build_info *info, libxl_domain_build_state *state,
     6.5                 char **vms_ents, char **local_ents)
     6.6  {
     6.7 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
     6.8 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
     6.9      char *dom_path, *vm_path;
    6.10      xs_transaction_t t;
    6.11      char **ents;
    6.12 @@ -261,7 +261,7 @@ static int hvm_build_set_params(xc_inter
    6.13  int libxl__build_hvm(libxl_ctx *ctx, uint32_t domid,
    6.14                libxl_domain_build_info *info, libxl_domain_build_state *state)
    6.15  {
    6.16 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    6.17 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    6.18      int ret, rc = ERROR_INVAL;
    6.19  
    6.20      if (info->kernel.mapped) {
    6.21 @@ -311,7 +311,7 @@ int libxl__domain_restore_common(libxl_c
    6.22  }
    6.23  
    6.24  struct suspendinfo {
    6.25 -    libxl_gc *gc;
    6.26 +    libxl__gc *gc;
    6.27      int xce; /* event channel handle */
    6.28      int suspend_eventchn;
    6.29      int domid;
    6.30 @@ -343,7 +343,7 @@ static int libxl__domain_suspend_common_
    6.31      int ret;
    6.32      char *path, *state = "suspend";
    6.33      int watchdog = 60;
    6.34 -    libxl_ctx *ctx = libxl_gc_owner(si->gc);
    6.35 +    libxl_ctx *ctx = libxl__gc_owner(si->gc);
    6.36  
    6.37      if (si->hvm)
    6.38          xc_get_hvm_param(ctx->xch, si->domid, HVM_PARAM_ACPI_S_STATE, &s_state);
    6.39 @@ -397,7 +397,7 @@ static int libxl__domain_suspend_common_
    6.40  int libxl__domain_suspend_common(libxl_ctx *ctx, uint32_t domid, int fd,
    6.41  		int hvm, int live, int debug)
    6.42  {
    6.43 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    6.44 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    6.45      int flags;
    6.46      int port;
    6.47      struct save_callbacks callbacks;
    6.48 @@ -449,7 +449,7 @@ out:
    6.49  
    6.50  int libxl__domain_save_device_model(libxl_ctx *ctx, uint32_t domid, int fd)
    6.51  {
    6.52 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    6.53 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    6.54      int fd2, c;
    6.55      char buf[1024];
    6.56      char *filename = libxl__sprintf(&gc, "/var/lib/xen/qemu-save.%d", domid);
    6.57 @@ -483,19 +483,19 @@ int libxl__domain_save_device_model(libx
    6.58      return 0;
    6.59  }
    6.60  
    6.61 -char *libxl__uuid2string(libxl_gc *gc, const libxl_uuid uuid)
    6.62 +char *libxl__uuid2string(libxl__gc *gc, const libxl_uuid uuid)
    6.63  {
    6.64      char *s = libxl__sprintf(gc, LIBXL_UUID_FMT, LIBXL_UUID_BYTES(uuid));
    6.65      if (!s)
    6.66 -        LIBXL__LOG(libxl_gc_owner(gc), LIBXL__LOG_ERROR, "cannot allocate for uuid");
    6.67 +        LIBXL__LOG(libxl__gc_owner(gc), LIBXL__LOG_ERROR, "cannot allocate for uuid");
    6.68      return s;
    6.69  }
    6.70  
    6.71 -static const char *userdata_path(libxl_gc *gc, uint32_t domid,
    6.72 +static const char *userdata_path(libxl__gc *gc, uint32_t domid,
    6.73                                        const char *userdata_userid,
    6.74                                        const char *wh)
    6.75  {
    6.76 -    libxl_ctx *ctx = libxl_gc_owner(gc);
    6.77 +    libxl_ctx *ctx = libxl__gc_owner(gc);
    6.78      char *path, *uuid_string;
    6.79      libxl_dominfo info;
    6.80      int rc;
    6.81 @@ -529,7 +529,7 @@ static int userdata_delete(libxl_ctx *ct
    6.82  
    6.83  void libxl__userdata_destroyall(libxl_ctx *ctx, uint32_t domid)
    6.84  {
    6.85 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    6.86 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    6.87      const char *pattern;
    6.88      glob_t gl;
    6.89      int r, i;
    6.90 @@ -559,7 +559,7 @@ int libxl_userdata_store(libxl_ctx *ctx,
    6.91                                const char *userdata_userid,
    6.92                                const uint8_t *data, int datalen)
    6.93  {
    6.94 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
    6.95 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
    6.96      const char *filename;
    6.97      const char *newfilename;
    6.98      int e, rc;
    6.99 @@ -628,7 +628,7 @@ int libxl_userdata_retrieve(libxl_ctx *c
   6.100                                   const char *userdata_userid,
   6.101                                   uint8_t **data_r, int *datalen_r)
   6.102  {
   6.103 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   6.104 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   6.105      const char *filename;
   6.106      int e, rc;
   6.107      int datalen = 0;
     7.1 --- a/tools/libxl/libxl_exec.c	Wed Sep 08 16:47:32 2010 +0100
     7.2 +++ b/tools/libxl/libxl_exec.c	Wed Sep 08 16:48:48 2010 +0100
     7.3 @@ -97,7 +97,7 @@ int libxl__spawn_spawn(libxl_ctx *ctx,
     7.4      pid_t child, got;
     7.5      int status;
     7.6      pid_t intermediate;
     7.7 -    libxl_spawn_starting *for_spawn = starting->for_spawn;
     7.8 +    libxl__spawn_starting *for_spawn = starting->for_spawn;
     7.9  
    7.10      if (for_spawn) {
    7.11          for_spawn->what = strdup(what);
    7.12 @@ -136,7 +136,7 @@ int libxl__spawn_spawn(libxl_ctx *ctx,
    7.13  }
    7.14  
    7.15  static void report_spawn_intermediate_status(libxl_ctx *ctx,
    7.16 -                                 libxl_spawn_starting *for_spawn,
    7.17 +                                 libxl__spawn_starting *for_spawn,
    7.18                                   int status)
    7.19  {
    7.20      if (!WIFEXITED(status)) {
    7.21 @@ -152,7 +152,7 @@ static void report_spawn_intermediate_st
    7.22  }
    7.23  
    7.24  int libxl__spawn_detach(libxl_ctx *ctx,
    7.25 -                       libxl_spawn_starting *for_spawn)
    7.26 +                       libxl__spawn_starting *for_spawn)
    7.27  {
    7.28      int r, status;
    7.29      pid_t got;
    7.30 @@ -186,7 +186,7 @@ int libxl__spawn_detach(libxl_ctx *ctx,
    7.31  
    7.32  int libxl__spawn_check(libxl_ctx *ctx, void *for_spawn_void)
    7.33  {
    7.34 -    libxl_spawn_starting *for_spawn = for_spawn_void;
    7.35 +    libxl__spawn_starting *for_spawn = for_spawn_void;
    7.36      pid_t got;
    7.37      int status;
    7.38  
     8.1 --- a/tools/libxl/libxl_internal.c	Wed Sep 08 16:47:32 2010 +0100
     8.2 +++ b/tools/libxl/libxl_internal.c	Wed Sep 08 16:48:48 2010 +0100
     8.3 @@ -34,7 +34,7 @@ int libxl__error_set(libxl_ctx *ctx, int
     8.4      return 0;
     8.5  }
     8.6  
     8.7 -int libxl__ptr_add(libxl_gc *gc, void *ptr)
     8.8 +int libxl__ptr_add(libxl__gc *gc, void *ptr)
     8.9  {
    8.10      int i;
    8.11      void **re;
    8.12 @@ -65,7 +65,7 @@ int libxl__ptr_add(libxl_gc *gc, void *p
    8.13      return 0;
    8.14  }
    8.15  
    8.16 -void libxl__free_all(libxl_gc *gc)
    8.17 +void libxl__free_all(libxl__gc *gc)
    8.18  {
    8.19      void *ptr;
    8.20      int i;
    8.21 @@ -78,11 +78,11 @@ void libxl__free_all(libxl_gc *gc)
    8.22      free(gc->alloc_ptrs);
    8.23  }
    8.24  
    8.25 -void *libxl__zalloc(libxl_gc *gc, int bytes)
    8.26 +void *libxl__zalloc(libxl__gc *gc, int bytes)
    8.27  {
    8.28      void *ptr = calloc(bytes, 1);
    8.29      if (!ptr) {
    8.30 -        libxl__error_set(libxl_gc_owner(gc), ENOMEM);
    8.31 +        libxl__error_set(libxl__gc_owner(gc), ENOMEM);
    8.32          return NULL;
    8.33      }
    8.34  
    8.35 @@ -90,11 +90,11 @@ void *libxl__zalloc(libxl_gc *gc, int by
    8.36      return ptr;
    8.37  }
    8.38  
    8.39 -void *libxl__calloc(libxl_gc *gc, size_t nmemb, size_t size)
    8.40 +void *libxl__calloc(libxl__gc *gc, size_t nmemb, size_t size)
    8.41  {
    8.42      void *ptr = calloc(nmemb, size);
    8.43      if (!ptr) {
    8.44 -        libxl__error_set(libxl_gc_owner(gc), ENOMEM);
    8.45 +        libxl__error_set(libxl__gc_owner(gc), ENOMEM);
    8.46          return NULL;
    8.47      }
    8.48  
    8.49 @@ -102,7 +102,7 @@ void *libxl__calloc(libxl_gc *gc, size_t
    8.50      return ptr;
    8.51  }
    8.52  
    8.53 -char *libxl__sprintf(libxl_gc *gc, const char *fmt, ...)
    8.54 +char *libxl__sprintf(libxl__gc *gc, const char *fmt, ...)
    8.55  {
    8.56      char *s;
    8.57      va_list ap;
    8.58 @@ -125,7 +125,7 @@ char *libxl__sprintf(libxl_gc *gc, const
    8.59      return s;
    8.60  }
    8.61  
    8.62 -char *libxl__strdup(libxl_gc *gc, const char *c)
    8.63 +char *libxl__strdup(libxl__gc *gc, const char *c)
    8.64  {
    8.65      char *s = strdup(c);
    8.66  
    8.67 @@ -135,7 +135,7 @@ char *libxl__strdup(libxl_gc *gc, const 
    8.68      return s;
    8.69  }
    8.70  
    8.71 -char *libxl__dirname(libxl_gc *gc, const char *s)
    8.72 +char *libxl__dirname(libxl__gc *gc, const char *s)
    8.73  {
    8.74      char *c;
    8.75      char *ptr = libxl__strdup(gc, s);
    8.76 @@ -184,7 +184,7 @@ void libxl__log(libxl_ctx *ctx, xentooll
    8.77      va_end(ap);
    8.78  }
    8.79  
    8.80 -char *libxl__abs_path(libxl_gc *gc, char *s, const char *path)
    8.81 +char *libxl__abs_path(libxl__gc *gc, char *s, const char *path)
    8.82  {
    8.83      if (!s || s[0] == '/')
    8.84          return s;
     9.1 --- a/tools/libxl/libxl_internal.h	Wed Sep 08 16:47:32 2010 +0100
     9.2 +++ b/tools/libxl/libxl_internal.h	Wed Sep 08 16:48:48 2010 +0100
     9.3 @@ -83,7 +83,7 @@ typedef enum {
     9.4      DEVICE_VFB,
     9.5      DEVICE_VKBD,
     9.6      DEVICE_CONSOLE,
     9.7 -} libxl_device_kinds;
     9.8 +} libxl__device_kinds;
     9.9  
    9.10  #define is_valid_device_kind(kind) (((kind) >= DEVICE_VIF) && ((kind) <= DEVICE_CONSOLE))
    9.11  
    9.12 @@ -92,9 +92,9 @@ typedef struct {
    9.13      uint32_t backend_domid;
    9.14      uint32_t devid;
    9.15      uint32_t domid;
    9.16 -    libxl_device_kinds backend_kind;
    9.17 -    libxl_device_kinds kind;
    9.18 -} libxl_device;
    9.19 +    libxl__device_kinds backend_kind;
    9.20 +    libxl__device_kinds kind;
    9.21 +} libxl__device;
    9.22  
    9.23  #define XC_PCI_BDF             "0x%x, 0x%x, 0x%x, 0x%x"
    9.24  #define AUTO_PHP_SLOT          0x100
    9.25 @@ -113,31 +113,31 @@ typedef struct {
    9.26      int alloc_maxsize;
    9.27      void **alloc_ptrs;
    9.28      libxl_ctx *owner;
    9.29 -} libxl_gc;
    9.30 +} libxl__gc;
    9.31  
    9.32 -#define LIBXL_INIT_GC(ctx) (libxl_gc){ .alloc_maxsize = 0, .alloc_ptrs = 0, .owner = ctx }
    9.33 -static inline libxl_ctx *libxl_gc_owner(libxl_gc *gc)
    9.34 +#define LIBXL_INIT_GC(ctx) (libxl__gc){ .alloc_maxsize = 0, .alloc_ptrs = 0, .owner = ctx }
    9.35 +static inline libxl_ctx *libxl__gc_owner(libxl__gc *gc)
    9.36  {
    9.37      return gc->owner;
    9.38  }
    9.39  
    9.40  /* memory allocation tracking/helpers */
    9.41 -_hidden int libxl__ptr_add(libxl_gc *gc, void *ptr);
    9.42 -_hidden void libxl__free_all(libxl_gc *gc);
    9.43 -_hidden void *libxl__zalloc(libxl_gc *gc, int bytes);
    9.44 -_hidden void *libxl__calloc(libxl_gc *gc, size_t nmemb, size_t size);
    9.45 -_hidden char *libxl__sprintf(libxl_gc *gc, const char *fmt, ...) PRINTF_ATTRIBUTE(2, 3);
    9.46 -_hidden char *libxl__strdup(libxl_gc *gc, const char *c);
    9.47 -_hidden char *libxl__dirname(libxl_gc *gc, const char *s);
    9.48 +_hidden int libxl__ptr_add(libxl__gc *gc, void *ptr);
    9.49 +_hidden void libxl__free_all(libxl__gc *gc);
    9.50 +_hidden void *libxl__zalloc(libxl__gc *gc, int bytes);
    9.51 +_hidden void *libxl__calloc(libxl__gc *gc, size_t nmemb, size_t size);
    9.52 +_hidden char *libxl__sprintf(libxl__gc *gc, const char *fmt, ...) PRINTF_ATTRIBUTE(2, 3);
    9.53 +_hidden char *libxl__strdup(libxl__gc *gc, const char *c);
    9.54 +_hidden char *libxl__dirname(libxl__gc *gc, const char *s);
    9.55  
    9.56 -_hidden char **libxl__xs_kvs_of_flexarray(libxl_gc *gc, flexarray_t *array, int length);
    9.57 -_hidden int libxl__xs_writev(libxl_gc *gc, xs_transaction_t t,
    9.58 +_hidden char **libxl__xs_kvs_of_flexarray(libxl__gc *gc, flexarray_t *array, int length);
    9.59 +_hidden int libxl__xs_writev(libxl__gc *gc, xs_transaction_t t,
    9.60                      char *dir, char **kvs);
    9.61 -_hidden int libxl__xs_write(libxl_gc *gc, xs_transaction_t t,
    9.62 +_hidden int libxl__xs_write(libxl__gc *gc, xs_transaction_t t,
    9.63                     char *path, char *fmt, ...) PRINTF_ATTRIBUTE(4, 5);
    9.64 -_hidden char *libxl__xs_get_dompath(libxl_gc *gc, uint32_t domid); // logs errs
    9.65 -_hidden char *libxl__xs_read(libxl_gc *gc, xs_transaction_t t, char *path);
    9.66 -_hidden char **libxl__xs_directory(libxl_gc *gc, xs_transaction_t t, char *path, unsigned int *nb);
    9.67 +_hidden char *libxl__xs_get_dompath(libxl__gc *gc, uint32_t domid); // logs errs
    9.68 +_hidden char *libxl__xs_read(libxl__gc *gc, xs_transaction_t t, char *path);
    9.69 +_hidden char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t, char *path, unsigned int *nb);
    9.70  
    9.71  /* from xl_dom */
    9.72  _hidden int libxl__domain_is_hvm(libxl_ctx *ctx, uint32_t domid);
    9.73 @@ -167,9 +167,9 @@ static inline libxl_ctx *libxl_gc_owner(
    9.74  _hidden int libxl__device_physdisk_major_minor(const char *physpath, int *major, int *minor);
    9.75  _hidden int libxl__device_disk_dev_number(char *virtpath);
    9.76  
    9.77 -_hidden int libxl__device_generic_add(libxl_ctx *ctx, libxl_device *device,
    9.78 +_hidden int libxl__device_generic_add(libxl_ctx *ctx, libxl__device *device,
    9.79                               char **bents, char **fents);
    9.80 -_hidden int libxl__device_del(libxl_ctx *ctx, libxl_device *dev, int wait);
    9.81 +_hidden int libxl__device_del(libxl_ctx *ctx, libxl__device *dev, int wait);
    9.82  _hidden int libxl__device_destroy(libxl_ctx *ctx, char *be_path, int force);
    9.83  _hidden int libxl__devices_destroy(libxl_ctx *ctx, uint32_t domid, int force);
    9.84  _hidden int libxl__wait_for_device_model(libxl_ctx *ctx,
    9.85 @@ -190,10 +190,10 @@ typedef struct {
    9.86      /* all fields are private to libxl_spawn_... */
    9.87      pid_t intermediate;
    9.88      char *what; /* malloc'd in spawn_spawn */
    9.89 -}  libxl_spawn_starting;
    9.90 +} libxl__spawn_starting;
    9.91  
    9.92  struct libxl__device_model_starting {
    9.93 -    libxl_spawn_starting *for_spawn; /* first! */
    9.94 +    libxl__spawn_starting *for_spawn; /* first! */
    9.95      char *dom_path; /* from libxl_malloc, only for dm_xenstore_record_pid */
    9.96      int domid;
    9.97  };
    9.98 @@ -209,31 +209,31 @@ struct libxl__device_model_starting {
    9.99     * Caller, may pass 0 for for_spawn, in which case no need to detach.
   9.100     */
   9.101  _hidden int libxl__spawn_detach(libxl_ctx *ctx,
   9.102 -                       libxl_spawn_starting *for_spawn);
   9.103 +                       libxl__spawn_starting *for_spawn);
   9.104    /* Logs errors.  Idempotent, but only permitted after successful
   9.105     * call to libxl__spawn_spawn, and no point calling it again if it fails. */
   9.106  _hidden int libxl__spawn_check(libxl_ctx *ctx,
   9.107                        void *for_spawn);
   9.108    /* Logs errors but also returns them.
   9.109 -   * for_spawn must actually be a  libxl_spawn_starting*  but
   9.110 +   * for_spawn must actually be a  libxl__spawn_starting*  but
   9.111     * we take void* so you can pass this function directly to
   9.112     * libxl__wait_for_device_model.  Caller must still call detach. */
   9.113  
   9.114   /* low-level stuff, for synchronous subprocesses etc. */
   9.115  
   9.116  _hidden void libxl__exec(int stdinfd, int stdoutfd, int stderrfd, char *arg0, char **args); // logs errors, never returns
   9.117 -_hidden void libxl__log_child_exitstatus(libxl_gc *gc,
   9.118 +_hidden void libxl__log_child_exitstatus(libxl__gc *gc,
   9.119                                  const char *what, pid_t pid, int status);
   9.120  
   9.121 -_hidden char *libxl__abs_path(libxl_gc *gc, char *s, const char *path);
   9.122 +_hidden char *libxl__abs_path(libxl__gc *gc, char *s, const char *path);
   9.123  
   9.124  #define LIBXL__LOG_DEBUG   XTL_DEBUG
   9.125  #define LIBXL__LOG_INFO    XTL_INFO
   9.126  #define LIBXL__LOG_WARNING XTL_WARN
   9.127  #define LIBXL__LOG_ERROR   XTL_ERROR
   9.128  
   9.129 -_hidden char *libxl__domid_to_name(libxl_gc *gc, uint32_t domid);
   9.130 -_hidden char *libxl__poolid_to_name(libxl_gc *gc, uint32_t poolid);
   9.131 +_hidden char *libxl__domid_to_name(libxl__gc *gc, uint32_t domid);
   9.132 +_hidden char *libxl__poolid_to_name(libxl__gc *gc, uint32_t poolid);
   9.133  
   9.134  /*
   9.135   * blktap2 support
   9.136 @@ -242,7 +242,7 @@ struct libxl__device_model_starting {
   9.137  /* libxl__blktap_enabled:
   9.138   *    return true if blktap/blktap2 support is available.
   9.139   */
   9.140 -_hidden int libxl__blktap_enabled(libxl_gc *gc);
   9.141 +_hidden int libxl__blktap_enabled(libxl__gc *gc);
   9.142  
   9.143  /* libxl__blktap_devpath:
   9.144   *    Argument: path and disk image as specified in config file.
   9.145 @@ -250,11 +250,11 @@ struct libxl__device_model_starting {
   9.146   *    returns device path xenstore wants to have. returns NULL
   9.147   *      if no device corresponds to the disk.
   9.148   */
   9.149 -_hidden const char *libxl__blktap_devpath(libxl_gc *gc,
   9.150 +_hidden const char *libxl__blktap_devpath(libxl__gc *gc,
   9.151                                   const char *disk,
   9.152                                   libxl_disk_phystype phystype);
   9.153  
   9.154 -_hidden char *libxl__uuid2string(libxl_gc *gc, const libxl_uuid uuid);
   9.155 +_hidden char *libxl__uuid2string(libxl__gc *gc, const libxl_uuid uuid);
   9.156  
   9.157  struct libxl__xen_console_reader {
   9.158      char *buffer;
    10.1 --- a/tools/libxl/libxl_noblktap2.c	Wed Sep 08 16:47:32 2010 +0100
    10.2 +++ b/tools/libxl/libxl_noblktap2.c	Wed Sep 08 16:48:48 2010 +0100
    10.3 @@ -16,12 +16,12 @@
    10.4  #include "libxl_osdeps.h"
    10.5  #include "libxl_internal.h"
    10.6  
    10.7 -int libxl__blktap_enabled(libxl_gc *gc)
    10.8 +int libxl__blktap_enabled(libxl__gc *gc)
    10.9  {
   10.10      return 0;
   10.11  }
   10.12  
   10.13 -const char *libxl__blktap_devpath(libxl_gc *gc,
   10.14 +const char *libxl__blktap_devpath(libxl__gc *gc,
   10.15                                   const char *disk,
   10.16                                   libxl_disk_phystype phystype)
   10.17  {
    11.1 --- a/tools/libxl/libxl_pci.c	Wed Sep 08 16:47:32 2010 +0100
    11.2 +++ b/tools/libxl/libxl_pci.c	Wed Sep 08 16:48:48 2010 +0100
    11.3 @@ -196,14 +196,14 @@ parse_error:
    11.4      return ERROR_INVAL;
    11.5  }
    11.6  
    11.7 -static int libxl_create_pci_backend(libxl_gc *gc, uint32_t domid, libxl_device_pci *pcidev, int num)
    11.8 +static int libxl_create_pci_backend(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, int num)
    11.9  {
   11.10 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   11.11 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   11.12      flexarray_t *front;
   11.13      flexarray_t *back;
   11.14      unsigned int boffset = 0;
   11.15      unsigned int foffset = 0;
   11.16 -    libxl_device device;
   11.17 +    libxl__device device;
   11.18      int i;
   11.19  
   11.20      front = flexarray_make(16, 1);
   11.21 @@ -262,9 +262,9 @@ static int libxl_create_pci_backend(libx
   11.22      return 0;
   11.23  }
   11.24  
   11.25 -static int libxl_device_pci_add_xenstore(libxl_gc *gc, uint32_t domid, libxl_device_pci *pcidev)
   11.26 +static int libxl_device_pci_add_xenstore(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev)
   11.27  {
   11.28 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   11.29 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   11.30      flexarray_t *back;
   11.31      char *num_devs, *be_path;
   11.32      int num = 0;
   11.33 @@ -316,9 +316,9 @@ retry_transaction:
   11.34      return 0;
   11.35  }
   11.36  
   11.37 -static int libxl_device_pci_remove_xenstore(libxl_gc *gc, uint32_t domid, libxl_device_pci *pcidev)
   11.38 +static int libxl_device_pci_remove_xenstore(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev)
   11.39  {
   11.40 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   11.41 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   11.42      char *be_path, *num_devs_path, *num_devs, *xsdev, *tmp, *tmppath;
   11.43      int num, i, j;
   11.44      xs_transaction_t t;
   11.45 @@ -422,7 +422,7 @@ retry_transaction2:
   11.46      return 0;
   11.47  }
   11.48  
   11.49 -static int get_all_assigned_devices(libxl_gc *gc, libxl_device_pci **list, int *num)
   11.50 +static int get_all_assigned_devices(libxl__gc *gc, libxl_device_pci **list, int *num)
   11.51  {
   11.52      libxl_device_pci *pcidevs = NULL;
   11.53      char **domlist;
   11.54 @@ -490,7 +490,7 @@ static int is_assigned(libxl_device_pci 
   11.55  
   11.56  int libxl_device_pci_list_assignable(libxl_ctx *ctx, libxl_device_pci **list, int *num)
   11.57  {
   11.58 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   11.59 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   11.60      libxl_device_pci *pcidevs = NULL, *new, *assigned;
   11.61      struct dirent *de;
   11.62      DIR *dir;
   11.63 @@ -545,9 +545,9 @@ int libxl_device_pci_list_assignable(lib
   11.64   * driver. It also initialises a bit-mask of which function numbers are present
   11.65   * on that device.
   11.66  */
   11.67 -static int pci_multifunction_check(libxl_gc *gc, libxl_device_pci *pcidev, unsigned int *func_mask)
   11.68 +static int pci_multifunction_check(libxl__gc *gc, libxl_device_pci *pcidev, unsigned int *func_mask)
   11.69  {
   11.70 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   11.71 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   11.72      struct dirent *de;
   11.73      DIR *dir;
   11.74  
   11.75 @@ -604,9 +604,9 @@ static int pci_ins_check(libxl_ctx *ctx,
   11.76      return 1;
   11.77  }
   11.78   
   11.79 -static int do_pci_add(libxl_gc *gc, uint32_t domid, libxl_device_pci *pcidev)
   11.80 +static int do_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev)
   11.81  {
   11.82 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   11.83 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   11.84      char *path;
   11.85      char *state, *vdevfn;
   11.86      int rc, hvm;
   11.87 @@ -710,10 +710,10 @@ out:
   11.88      return 0;
   11.89  }
   11.90  
   11.91 -static int libxl_device_pci_reset(libxl_gc *gc, unsigned int domain, unsigned int bus,
   11.92 +static int libxl_device_pci_reset(libxl__gc *gc, unsigned int domain, unsigned int bus,
   11.93                           unsigned int dev, unsigned int func)
   11.94  {
   11.95 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   11.96 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   11.97      char *reset;
   11.98      int fd, rc;
   11.99  
  11.100 @@ -748,7 +748,7 @@ static int libxl_device_pci_reset(libxl_
  11.101  
  11.102  int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev)
  11.103  {
  11.104 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
  11.105 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
  11.106      unsigned int orig_vdev, pfunc_mask;
  11.107      libxl_device_pci *assigned;
  11.108      int num_assigned, i, rc;
  11.109 @@ -816,9 +816,9 @@ out:
  11.110      return rc;
  11.111  }
  11.112  
  11.113 -static int do_pci_remove(libxl_gc *gc, uint32_t domid, libxl_device_pci *pcidev)
  11.114 +static int do_pci_remove(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev)
  11.115  {
  11.116 -    libxl_ctx *ctx = libxl_gc_owner(gc);
  11.117 +    libxl_ctx *ctx = libxl__gc_owner(gc);
  11.118      libxl_device_pci *assigned;
  11.119      char *path;
  11.120      char *state;
  11.121 @@ -931,7 +931,7 @@ out:
  11.122  
  11.123  int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev)
  11.124  {
  11.125 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
  11.126 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
  11.127      unsigned int orig_vdev, pfunc_mask;
  11.128      int i, rc;
  11.129  
  11.130 @@ -967,7 +967,7 @@ out:
  11.131  
  11.132  int libxl_device_pci_list_assigned(libxl_ctx *ctx, libxl_device_pci **list, uint32_t domid, int *num)
  11.133  {
  11.134 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
  11.135 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
  11.136      char *be_path, *num_devs, *xsdev, *xsvdevfn, *xsopts;
  11.137      int n, i;
  11.138      unsigned int domain = 0, bus = 0, dev = 0, func = 0, vdevfn = 0;
    12.1 --- a/tools/libxl/libxl_utils.c	Wed Sep 08 16:47:32 2010 +0100
    12.2 +++ b/tools/libxl/libxl_utils.c	Wed Sep 08 16:48:48 2010 +0100
    12.3 @@ -54,9 +54,9 @@ char *libxl_domid_to_name(libxl_ctx *ctx
    12.4      return s;
    12.5  }
    12.6  
    12.7 -char *libxl__domid_to_name(libxl_gc *gc, uint32_t domid)
    12.8 +char *libxl__domid_to_name(libxl__gc *gc, uint32_t domid)
    12.9  {
   12.10 -    char *s = libxl_domid_to_name(libxl_gc_owner(gc), domid);
   12.11 +    char *s = libxl_domid_to_name(libxl__gc_owner(gc), domid);
   12.12      if ( s )
   12.13          libxl__ptr_add(gc, s);
   12.14      return s;
   12.15 @@ -103,9 +103,9 @@ char *libxl_poolid_to_name(libxl_ctx *ct
   12.16      return s;
   12.17  }
   12.18  
   12.19 -char *libxl__poolid_to_name(libxl_gc *gc, uint32_t poolid)
   12.20 +char *libxl__poolid_to_name(libxl__gc *gc, uint32_t poolid)
   12.21  {
   12.22 -    char *s = libxl_poolid_to_name(libxl_gc_owner(gc), poolid);
   12.23 +    char *s = libxl_poolid_to_name(libxl__gc_owner(gc), poolid);
   12.24      if ( s )
   12.25          libxl__ptr_add(gc, s);
   12.26      return s;
   12.27 @@ -141,7 +141,7 @@ int libxl_name_to_poolid(libxl_ctx *ctx,
   12.28  
   12.29  int libxl_get_stubdom_id(libxl_ctx *ctx, int guest_domid)
   12.30  {
   12.31 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   12.32 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   12.33      char * stubdom_id_s;
   12.34      int ret;
   12.35  
   12.36 @@ -158,7 +158,7 @@ int libxl_get_stubdom_id(libxl_ctx *ctx,
   12.37  
   12.38  int libxl_is_stubdom(libxl_ctx *ctx, uint32_t domid, uint32_t *target_domid)
   12.39  {
   12.40 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   12.41 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   12.42      char *target, *endptr;
   12.43      uint32_t value;
   12.44      int ret = 0;
   12.45 @@ -193,7 +193,7 @@ static int logrename(libxl_ctx *ctx, con
   12.46  
   12.47  int libxl_create_logfile(libxl_ctx *ctx, char *name, char **full_name)
   12.48  {
   12.49 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   12.50 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   12.51      struct stat stat_buf;
   12.52      char *logfile, *logfile_new;
   12.53      int i, rc;
   12.54 @@ -448,7 +448,7 @@ int libxl_mac_to_device_nic(libxl_ctx *c
   12.55  int libxl_devid_to_device_nic(libxl_ctx *ctx, uint32_t domid,
   12.56                                const char *devid, libxl_device_nic *nic)
   12.57  {
   12.58 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   12.59 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   12.60      char *tok, *val;
   12.61      char *dompath, *nic_path_fe, *nic_path_be;
   12.62      unsigned int i;
   12.63 @@ -484,7 +484,7 @@ out:
   12.64  int libxl_devid_to_device_disk(libxl_ctx *ctx, uint32_t domid,
   12.65                                 const char *devid, libxl_device_disk *disk)
   12.66  {
   12.67 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   12.68 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   12.69      char *endptr, *val;
   12.70      char *dompath, *diskpath, *be_path;
   12.71      unsigned int devid_n;
   12.72 @@ -527,7 +527,7 @@ out:
   12.73  int libxl_devid_to_device_net2(libxl_ctx *ctx, uint32_t domid,
   12.74                                 const char *devid, libxl_device_net2 *net2)
   12.75  {
   12.76 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   12.77 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   12.78      char *tok, *endptr, *val;
   12.79      char *dompath, *net2path, *be_path;
   12.80      unsigned int devid_n, i;
   12.81 @@ -598,7 +598,7 @@ int libxl_strtomac(const char *mac_s, ui
   12.82  
   12.83  int libxl_check_device_model_version(libxl_ctx *ctx, char *path)
   12.84  {
   12.85 -    libxl_gc gc = LIBXL_INIT_GC(ctx);
   12.86 +    libxl__gc gc = LIBXL_INIT_GC(ctx);
   12.87      pid_t pid = -1;
   12.88      int pipefd[2];
   12.89      char buf[100];
    13.1 --- a/tools/libxl/libxl_xshelp.c	Wed Sep 08 16:47:32 2010 +0100
    13.2 +++ b/tools/libxl/libxl_xshelp.c	Wed Sep 08 16:48:48 2010 +0100
    13.3 @@ -44,7 +44,7 @@ int xs_writev(struct xs_handle *xsh, xs_
    13.4      return 0;
    13.5  }
    13.6  
    13.7 -char **libxl__xs_kvs_of_flexarray(libxl_gc *gc, flexarray_t *array, int length)
    13.8 +char **libxl__xs_kvs_of_flexarray(libxl__gc *gc, flexarray_t *array, int length)
    13.9  {
   13.10      char **kvs;
   13.11      int i;
   13.12 @@ -68,10 +68,10 @@ char **libxl__xs_kvs_of_flexarray(libxl_
   13.13      return kvs;
   13.14  }
   13.15  
   13.16 -int libxl__xs_writev(libxl_gc *gc, xs_transaction_t t,
   13.17 +int libxl__xs_writev(libxl__gc *gc, xs_transaction_t t,
   13.18                      char *dir, char *kvs[])
   13.19  {
   13.20 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   13.21 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   13.22      char *path;
   13.23      int i;
   13.24  
   13.25 @@ -88,10 +88,10 @@ int libxl__xs_writev(libxl_gc *gc, xs_tr
   13.26      return 0;
   13.27  }
   13.28  
   13.29 -int libxl__xs_write(libxl_gc *gc, xs_transaction_t t,
   13.30 +int libxl__xs_write(libxl__gc *gc, xs_transaction_t t,
   13.31                     char *path, char *fmt, ...)
   13.32  {
   13.33 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   13.34 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   13.35      char *s;
   13.36      va_list ap;
   13.37      int ret;
   13.38 @@ -107,9 +107,9 @@ int libxl__xs_write(libxl_gc *gc, xs_tra
   13.39      return 0;
   13.40  }
   13.41  
   13.42 -char * libxl__xs_read(libxl_gc *gc, xs_transaction_t t, char *path)
   13.43 +char * libxl__xs_read(libxl__gc *gc, xs_transaction_t t, char *path)
   13.44  {
   13.45 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   13.46 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   13.47      char *ptr;
   13.48  
   13.49      ptr = xs_read(ctx->xsh, t, path, NULL);
   13.50 @@ -120,9 +120,9 @@ char * libxl__xs_read(libxl_gc *gc, xs_t
   13.51      return 0;
   13.52  }
   13.53  
   13.54 -char *libxl__xs_get_dompath(libxl_gc *gc, uint32_t domid)
   13.55 +char *libxl__xs_get_dompath(libxl__gc *gc, uint32_t domid)
   13.56  {
   13.57 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   13.58 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   13.59      char *s = xs_get_domain_path(ctx->xsh, domid);
   13.60      if (!s) {
   13.61          LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "failed to get dompath for %" PRIu32,
   13.62 @@ -133,9 +133,9 @@ char *libxl__xs_get_dompath(libxl_gc *gc
   13.63      return s;
   13.64  }
   13.65  
   13.66 -char **libxl__xs_directory(libxl_gc *gc, xs_transaction_t t, char *path, unsigned int *nb)
   13.67 +char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t, char *path, unsigned int *nb)
   13.68  {
   13.69 -    libxl_ctx *ctx = libxl_gc_owner(gc);
   13.70 +    libxl_ctx *ctx = libxl__gc_owner(gc);
   13.71      char **ret = NULL;
   13.72      ret = xs_directory(ctx->xsh, XBT_NULL, path, nb);
   13.73      libxl__ptr_add(gc, ret);