libxl: expand hard tab stops
authorIan Campbell <ian.campbell@citrix.com>
Tue, 11 Oct 2011 13:26:00 +0000 (14:26 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 11 Oct 2011 13:26:00 +0000 (14:26 +0100)
I ran the following and committed the result. ^I is an actual hard tab

for i in $(grep -l --exclude=*_[ly].\[ch\] '^I' tools/libxl/*.[ch]) ; do
     cat $i | expand | sponge $i
done

There are some actually wrong indentations too, I'll fix those up
manually.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/libxl_bootloader.c
tools/libxl/libxl_cpuid.c
tools/libxl/libxl_internal.c
tools/libxl/libxl_nocpuid.c
tools/libxl/libxl_pci.c
tools/libxl/libxl_utils.c
tools/libxl/libxlutil.h
tools/libxl/xl_cmdimpl.c

index 1e23e9dfbd0579da0100ff58d9f299c66e491aca..61450ee70b17138716dcdf0f6e75025b50768134 100644 (file)
@@ -696,13 +696,13 @@ int libxl_event_get_disk_eject_info(libxl_ctx *ctx, uint32_t domid, libxl_event
     sscanf(backend,
             "/local/domain/%d/backend/%" TOSTRING(BACKEND_STRING_SIZE) "[a-z]/%*d/%*d",
             &disk->backend_domid, backend_type);
-       if (!strcmp(backend_type, "tap") || !strcmp(backend_type, "vbd")) {
-               disk->backend = LIBXL_DISK_BACKEND_TAP;
-       } else if (!strcmp(backend_type, "qdisk")) {
-               disk->backend = LIBXL_DISK_BACKEND_QDISK;
-       } else {
-               disk->backend = LIBXL_DISK_BACKEND_UNKNOWN;
-       }
+        if (!strcmp(backend_type, "tap") || !strcmp(backend_type, "vbd")) {
+                disk->backend = LIBXL_DISK_BACKEND_TAP;
+        } else if (!strcmp(backend_type, "qdisk")) {
+                disk->backend = LIBXL_DISK_BACKEND_QDISK;
+        } else {
+                disk->backend = LIBXL_DISK_BACKEND_UNKNOWN;
+        }
 
     disk->pdev_path = strdup("");
     disk->format = LIBXL_DISK_FORMAT_EMPTY;
index d14657523921591b98b05923edf58f96c8d2beb4..295050298dfa3f0b1e600eb79ab4a8424eaa3db2 100644 (file)
@@ -420,7 +420,7 @@ int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_list *cpuid,
                                   const char* str);
 void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid);
 void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid,
-                    libxl_cpuid_policy_list cpuid);
+                     libxl_cpuid_policy_list cpuid);
 
 /*
  * Functions for allowing users of libxl to store private data
index 111c22d48aa8998ba9960caf941a484923d842aa..a88907e45f81fab5c8ec6eba5bcd46d024a8c6f0 100644 (file)
@@ -81,14 +81,14 @@ static int open_xenconsoled_pty(int *master, int *slave, char *slave_path, size_
 
     ret = openpty(master, slave, NULL, NULL, NULL);
     if (ret < 0)
-           return -1;
+            return -1;
 
     ret = ttyname_r(*slave, slave_path, slave_path_len);
     if (ret == -1) {
-           close(*master);
-           close(*slave);
-           *master = *slave = -1;
-           return -1;
+            close(*master);
+            close(*slave);
+            *master = *slave = -1;
+            return -1;
     }
 
     /*
index 5c591f6f63c0d10456d398908075a6313e8b2f0d..2d66a881efbb2bb37a7646218ca7eaaf92b00821 100644 (file)
@@ -317,7 +317,7 @@ void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid)
 }
 
 void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid,
-                    libxl_cpuid_policy_list cpuid)
+                     libxl_cpuid_policy_list cpuid)
 {
     int i;
     char *cpuid_res[4];
index 3b8a41f2fb573836161128991485467841ca211e..08cb943e61d438d7b77e0699b060ecf6528e74f4 100644 (file)
@@ -228,53 +228,53 @@ char *libxl__abs_path(libxl__gc *gc, const char *s, const char *path)
 
 int libxl__file_reference_map(libxl_file_reference *f)
 {
-       struct stat st_buf;
-       int ret, fd;
-       void *data;
+        struct stat st_buf;
+        int ret, fd;
+        void *data;
 
-       if (f->mapped)
-               return 0;
+        if (f->mapped)
+                return 0;
 
-       fd = open(f->path, O_RDONLY);
-       if (f < 0)
-               return ERROR_FAIL;
+        fd = open(f->path, O_RDONLY);
+        if (f < 0)
+                return ERROR_FAIL;
 
-       ret = fstat(fd, &st_buf);
-       if (ret < 0)
-               goto out;
+        ret = fstat(fd, &st_buf);
+        if (ret < 0)
+                goto out;
 
-       ret = -1;
-       data = mmap(NULL, st_buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
-       if (data == NULL)
-               goto out;
+        ret = -1;
+        data = mmap(NULL, st_buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
+        if (data == NULL)
+                goto out;
 
-       f->mapped = 1;
-       f->data = data;
-       f->size = st_buf.st_size;
+        f->mapped = 1;
+        f->data = data;
+        f->size = st_buf.st_size;
 
-       ret = 0;
+        ret = 0;
 out:
-       close(fd);
+        close(fd);
 
-       return ret == 0 ? 0 : ERROR_FAIL;
+        return ret == 0 ? 0 : ERROR_FAIL;
 }
 
 int libxl__file_reference_unmap(libxl_file_reference *f)
 {
-       int ret;
+        int ret;
 
-       if (!f->mapped)
-               return 0;
+        if (!f->mapped)
+                return 0;
 
-       ret = munmap(f->data, f->size);
-       if (ret == 0) {
-               f->mapped = 0;
-               f->data = NULL;
-               f->size = 0;
-               return 0;
-       }
+        ret = munmap(f->data, f->size);
+        if (ret == 0) {
+                f->mapped = 0;
+                f->data = NULL;
+                f->size = 0;
+                return 0;
+        }
 
-       return ERROR_FAIL;
+        return ERROR_FAIL;
 }
 
 _hidden int libxl__parse_mac(const char *s, libxl_mac mac)
index 25b49a16fc4ea6857e004f6461e6b1987b05987c..923261e2740d92a4183a286c114c981fb9e12d6d 100644 (file)
@@ -32,6 +32,6 @@ void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid)
 }
 
 void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid,
-                    libxl_cpuid_policy_list cpuid)
+                     libxl_cpuid_policy_list cpuid)
 {
 }
index 1523cf07e12c783d85f57ad1e7427718d0897d4c..c1a62ceee790c7fb7a0441b1889467ab5ff69d93 100644 (file)
@@ -1113,7 +1113,7 @@ static int e820_sanitize(libxl_ctx *ctx, struct e820entry src[],
         if ((src[i].type == E820_RAM) ||
             (src[i].type == E820_UNUSABLE) ||
             (src[i].type == 0))
-               continue;
+                continue;
 
         start = src[i].addr < start ? src[i].addr : start;
         last = src[i].addr + src[i].size > last ?
@@ -1158,14 +1158,14 @@ static int e820_sanitize(libxl_ctx *ctx, struct e820entry src[],
      * to E820_UNUSED. We also need to move some of the E820_RAM regions if
      * the overlap with ram_end. */
     for (i = 0; i < nr; i++) {
-       uint64_t end = src[i].addr + src[i].size;
+        uint64_t end = src[i].addr + src[i].size;
 
-       /* We don't care about E820_UNUSABLE, but we need to
+        /* We don't care about E820_UNUSABLE, but we need to
          * change the type to zero b/c the loop after this
          * sticks E820_UNUSABLE on the guest's E820 but ignores
          * the ones with type zero. */
         if ((src[i].type == E820_UNUSABLE) ||
-           /* Any region that is within the "RAM region" can
+            /* Any region that is within the "RAM region" can
              * be safely ditched. */
             (end < ram_end)) {
                 src[i].type = 0;
@@ -1173,15 +1173,15 @@ static int e820_sanitize(libxl_ctx *ctx, struct e820entry src[],
         }
 
         /* Look only at RAM regions. */
-       if (src[i].type != E820_RAM)
+        if (src[i].type != E820_RAM)
             continue;
 
         /* We only care about RAM regions below 4GB. */
         if (src[i].addr >= (1ULL<<32))
             continue;
 
-       /* E820_RAM overlaps with our RAM region. Move it */
-       if (src[i].addr < ram_end) {
+        /* E820_RAM overlaps with our RAM region. Move it */
+        if (src[i].addr < ram_end) {
             uint64_t delta;
 
             src[i].type = E820_UNUSABLE;
@@ -1235,8 +1235,8 @@ static int e820_sanitize(libxl_ctx *ctx, struct e820entry src[],
     /* Almost done: copy them over, ignoring the undesireable ones */
     for (i = 0; i < nr; i++) {
         if ((src[i].type == E820_RAM) ||
-           (src[i].type == 0))
-           continue;
+            (src[i].type == 0))
+            continue;
 
         e820[idx].type = src[i].type;
         e820[idx].addr = src[i].addr;
index 9af254d5253ac62cca7b6f6a8f6f55bdc133aa2f..4b4c38574febd1244aed8382e0fbc30176f7c4c7 100644 (file)
@@ -457,7 +457,7 @@ int libxl_mac_to_device_nic(libxl_ctx *ctx, uint32_t domid,
 
     rc = libxl__parse_mac(mac, mac_n);
     if (rc)
-           return rc;
+            return rc;
 
     nics = libxl_list_nics(ctx, domid, &nb);
     if (!nics)
@@ -509,7 +509,7 @@ int libxl_devid_to_device_nic(libxl_ctx *ctx, uint32_t domid,
     val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/mac", nic_path_fe));
     rc = libxl__parse_mac(val, nic->mac);
     if (rc)
-           goto out;
+            goto out;
 
     nic->script = xs_read(ctx->xsh, XBT_NULL, libxl__sprintf(&gc, "%s/script", nic_path_be), NULL);
     rc = 0;
index c20de1d89abca72571e79aa14349f14f38ff6a57..6b48a06b685efcea58a562fcbec98d2c2c8c05e3 100644 (file)
@@ -64,7 +64,7 @@ const char *xlu_cfg_get_listitem(const XLU_ConfigList*, int entry);
  */
 
 int xlu_disk_parse(XLU_Config *cfg, int nspecs, const char *const *specs,
-                  libxl_device_disk *disk);
+                   libxl_device_disk *disk);
   /* disk must have been initialised.
    *
    * On error, returns errno value.  Bad strings cause EINVAL and
index 99e3c49e973faf24b856871e52f7be6d31081df4..f5212ad48f04a113684d64e80a878ef1a055942d 100644 (file)
@@ -497,15 +497,15 @@ static void parse_disk_config_multistring(XLU_Config **config,
     memset(disk, 0, sizeof(*disk));
 
     if (!*config) {
-       *config = xlu_cfg_init(stderr, "command line");
-       if (!*config) { perror("xlu_cfg_init"); exit(-1); }
+        *config = xlu_cfg_init(stderr, "command line");
+        if (!*config) { perror("xlu_cfg_init"); exit(-1); }
     }
 
     e = xlu_disk_parse(*config, nspecs, specs, disk);
     if (e == EINVAL) exit(-1);
     if (e) {
-       fprintf(stderr,"xlu_disk_parse failed: %s\n",strerror(errno));
-       exit(-1);
+        fprintf(stderr,"xlu_disk_parse failed: %s\n",strerror(errno));
+        exit(-1);
     }
 }