WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: expand hard tab stops

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: expand hard tab stops
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 14 Oct 2011 18:00:09 +0100
Delivery-date: Fri, 14 Oct 2011 10:04:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1318339560 -3600
# Node ID c5f8c3597cae4e3122ba067a33da28735630c9bb
# Parent  4b0907c6a08c348962bd976c2976257b412408be
libxl: expand hard tab stops

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@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 4b0907c6a08c -r c5f8c3597cae tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Tue Oct 11 12:02:58 2011 +0100
+++ b/tools/libxl/libxl.c       Tue Oct 11 14:26:00 2011 +0100
@@ -696,13 +696,13 @@
     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;
diff -r 4b0907c6a08c -r c5f8c3597cae tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Tue Oct 11 12:02:58 2011 +0100
+++ b/tools/libxl/libxl.h       Tue Oct 11 14:26:00 2011 +0100
@@ -420,7 +420,7 @@
                                   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
diff -r 4b0907c6a08c -r c5f8c3597cae tools/libxl/libxl_bootloader.c
--- a/tools/libxl/libxl_bootloader.c    Tue Oct 11 12:02:58 2011 +0100
+++ b/tools/libxl/libxl_bootloader.c    Tue Oct 11 14:26:00 2011 +0100
@@ -81,14 +81,14 @@
 
     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;
     }
 
     /*
diff -r 4b0907c6a08c -r c5f8c3597cae tools/libxl/libxl_cpuid.c
--- a/tools/libxl/libxl_cpuid.c Tue Oct 11 12:02:58 2011 +0100
+++ b/tools/libxl/libxl_cpuid.c Tue Oct 11 14:26:00 2011 +0100
@@ -317,7 +317,7 @@
 }
 
 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];
diff -r 4b0907c6a08c -r c5f8c3597cae tools/libxl/libxl_internal.c
--- a/tools/libxl/libxl_internal.c      Tue Oct 11 12:02:58 2011 +0100
+++ b/tools/libxl/libxl_internal.c      Tue Oct 11 14:26:00 2011 +0100
@@ -228,53 +228,53 @@
 
 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)
diff -r 4b0907c6a08c -r c5f8c3597cae tools/libxl/libxl_nocpuid.c
--- a/tools/libxl/libxl_nocpuid.c       Tue Oct 11 12:02:58 2011 +0100
+++ b/tools/libxl/libxl_nocpuid.c       Tue Oct 11 14:26:00 2011 +0100
@@ -32,6 +32,6 @@
 }
 
 void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid,
-                    libxl_cpuid_policy_list cpuid)
+                     libxl_cpuid_policy_list cpuid)
 {
 }
diff -r 4b0907c6a08c -r c5f8c3597cae tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c   Tue Oct 11 12:02:58 2011 +0100
+++ b/tools/libxl/libxl_pci.c   Tue Oct 11 14:26:00 2011 +0100
@@ -1113,7 +1113,7 @@
         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 @@
      * 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 @@
         }
 
         /* 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 @@
     /* 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;
diff -r 4b0907c6a08c -r c5f8c3597cae tools/libxl/libxl_utils.c
--- a/tools/libxl/libxl_utils.c Tue Oct 11 12:02:58 2011 +0100
+++ b/tools/libxl/libxl_utils.c Tue Oct 11 14:26:00 2011 +0100
@@ -457,7 +457,7 @@
 
     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 @@
     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;
diff -r 4b0907c6a08c -r c5f8c3597cae tools/libxl/libxlutil.h
--- a/tools/libxl/libxlutil.h   Tue Oct 11 12:02:58 2011 +0100
+++ b/tools/libxl/libxlutil.h   Tue Oct 11 14:26:00 2011 +0100
@@ -64,7 +64,7 @@
  */
 
 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
diff -r 4b0907c6a08c -r c5f8c3597cae tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Tue Oct 11 12:02:58 2011 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Tue Oct 11 14:26:00 2011 +0100
@@ -497,15 +497,15 @@
     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);
     }
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: expand hard tab stops, Xen patchbot-unstable <=