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-devel

[Xen-devel] [PATCH 2 of 3] libxl: fixup incorrect indentation

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2 of 3] libxl: fixup incorrect indentation
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Fri, 7 Oct 2011 15:08:44 +0100
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Fri, 07 Oct 2011 07:11:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1317996522@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1317996522@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1317996269 -3600
# Node ID ea75a1765a4a8da26089f42c68a1a1f15182a11f
# Parent  a440b0ad413b88ef7814f407b2fc3b412d586e9b
libxl: fixup incorrect indentation

Several places which were previsously indented using hard tabs are now
incorrectly indented. Fix them up.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r a440b0ad413b -r ea75a1765a4a tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Fri Oct 07 14:59:16 2011 +0100
+++ b/tools/libxl/libxl.c       Fri Oct 07 15:04:29 2011 +0100
@@ -696,13 +696,13 @@ int libxl_event_get_disk_eject_info(libx
     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 a440b0ad413b -r ea75a1765a4a tools/libxl/libxl_bootloader.c
--- a/tools/libxl/libxl_bootloader.c    Fri Oct 07 14:59:16 2011 +0100
+++ b/tools/libxl/libxl_bootloader.c    Fri Oct 07 15:04:29 2011 +0100
@@ -81,14 +81,14 @@ static int open_xenconsoled_pty(int *mas
 
     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 a440b0ad413b -r ea75a1765a4a tools/libxl/libxl_internal.c
--- a/tools/libxl/libxl_internal.c      Fri Oct 07 14:59:16 2011 +0100
+++ b/tools/libxl/libxl_internal.c      Fri Oct 07 15:04:29 2011 +0100
@@ -228,53 +228,53 @@ char *libxl__abs_path(libxl__gc *gc, con
 
 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 a440b0ad413b -r ea75a1765a4a tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c   Fri Oct 07 14:59:16 2011 +0100
+++ b/tools/libxl/libxl_pci.c   Fri Oct 07 15:04:29 2011 +0100
@@ -1114,7 +1114,7 @@ static int e820_sanitize(libxl_ctx *ctx,
         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 ?
diff -r a440b0ad413b -r ea75a1765a4a tools/libxl/libxl_utils.c
--- a/tools/libxl/libxl_utils.c Fri Oct 07 14:59:16 2011 +0100
+++ b/tools/libxl/libxl_utils.c Fri Oct 07 15:04:29 2011 +0100
@@ -457,7 +457,7 @@ int libxl_mac_to_device_nic(libxl_ctx *c
 
     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 
     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;

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