[Libguestfs] [PATCH libguestfs] maint: use spaces, not TABs for indentation

Jim Meyering jim at meyering.net
Thu Sep 24 07:26:13 UTC 2009


>From 1da1502b33d50bc0614a20bc217876fcb8f05d39 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at vv.meyering.net.meyering.net>
Date: Thu, 24 Sep 2009 09:24:55 +0200
Subject: [PATCH libguestfs] maint: use spaces, not TABs for indentation

"make syntax-check" was failing.  This fixes it.
* HACKING: Indent with spaces, not TABs.
* configure.ac: Likewise.
* rescue/virt-rescue: Likewise.
* src/generator.ml: Likewise.
---
 HACKING            |    4 ++--
 configure.ac       |    6 +++---
 rescue/virt-rescue |    2 +-
 src/generator.ml   |   48 ++++++++++++++++++++++++------------------------
 4 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/HACKING b/HACKING
index 19c2329..bdb8287 100644
--- a/HACKING
+++ b/HACKING
@@ -84,7 +84,7 @@ df/
         The virt-df tool.

 edit/
-	The virt-edit tool.
+        The virt-edit tool.

 examples/
         The examples.
@@ -126,7 +126,7 @@ regressions/
         Regression tests.

 rescue/
-	The virt-rescue tool.
+        The virt-rescue tool.

 ruby/
         Ruby bindings.
diff --git a/configure.ac b/configure.ac
index 5a0bb47..403a998 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,9 +167,9 @@ if test "x$vmchannel_test" != "xno"; then
         vmchannel_guestfwd=guestfwd
     else
         AC_MSG_RESULT([no])
-	# Note that this test must be conditional on the previous
-	# test failing.  This is because recent qemu will throw
-	# up an SDL window and hang if we try to run this test.
+        # Note that this test must be conditional on the previous
+        # test failing.  This is because recent qemu will throw
+        # up an SDL window and hang if we try to run this test.
         AC_MSG_CHECKING([for "-net channel" (old guestfwd) support in $QEMU])
         vmchannelout=`$QEMU -net channel /dev/zero 2>&1 ||:`
         echo "vmchannel test command output: $vmchannelout" >&AS_MESSAGE_LOG_FD
diff --git a/rescue/virt-rescue b/rescue/virt-rescue
index a44940d..9ad2fa4 100755
--- a/rescue/virt-rescue
+++ b/rescue/virt-rescue
@@ -111,7 +111,7 @@ Open the image read-only.
 GetOptions ("help|?" => \$help,
             "version" => \$version,
             "connect|c=s" => \$uri,
-	    "ro|r" => \$readonly,
+            "ro|r" => \$readonly,
     ) or pod2usage (2);
 pod2usage (1) if $help;
 if ($version) {
diff --git a/src/generator.ml b/src/generator.ml
index 1dd8b20..6f77e4b 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -4674,8 +4674,8 @@ check_state (guestfs_h *g, const char *caller)

     let needs_i =
       List.exists (function
-		   | StringList _ | DeviceList _ -> true
-		   | _ -> false) (snd style) in
+                   | StringList _ | DeviceList _ -> true
+                   | _ -> false) (snd style) in
     if needs_i then (
       pr "    int i;\n";
       pr "\n"
@@ -4690,24 +4690,24 @@ check_state (guestfs_h *g, const char *caller)
       | Dev_or_Path n
       | FileIn n
       | FileOut n ->
-	  (* guestfish doesn't support string escaping, so neither do we *)
-	  pr "    printf (\" \\\"%%s\\\"\", %s);\n" n
+          (* guestfish doesn't support string escaping, so neither do we *)
+          pr "    printf (\" \\\"%%s\\\"\", %s);\n" n
       | OptString n ->			(* string option *)
-	  pr "    if (%s) printf (\" \\\"%%s\\\"\", %s);\n" n n;
-	  pr "    else printf (\" null\");\n"
+          pr "    if (%s) printf (\" \\\"%%s\\\"\", %s);\n" n n;
+          pr "    else printf (\" null\");\n"
       | StringList n
       | DeviceList n ->			(* string list *)
-	  pr "    putchar (' ');\n";
-	  pr "    putchar ('\"');\n";
-	  pr "    for (i = 0; %s[i]; ++i) {\n" n;
-	  pr "      if (i > 0) putchar (' ');\n";
-	  pr "      fputs (%s[i], stdout);\n" n;
-	  pr "    }\n";
-	  pr "    putchar ('\"');\n";
+          pr "    putchar (' ');\n";
+          pr "    putchar ('\"');\n";
+          pr "    for (i = 0; %s[i]; ++i) {\n" n;
+          pr "      if (i > 0) putchar (' ');\n";
+          pr "      fputs (%s[i], stdout);\n" n;
+          pr "    }\n";
+          pr "    putchar ('\"');\n";
       | Bool n ->			(* boolean *)
-	  pr "    fputs (%s ? \" true\" : \" false\", stdout);\n" n
+          pr "    fputs (%s ? \" true\" : \" false\", stdout);\n" n
       | Int n ->			(* int *)
-	  pr "    printf (\" %%d\", %s);\n" n
+          pr "    printf (\" %%d\", %s);\n" n
     ) (snd style);
     pr "    putchar ('\\n');\n";
     pr "  }\n";
@@ -4759,16 +4759,16 @@ check_state (guestfs_h *g, const char *caller)
       pr "  guestfs_message_header hdr;\n";
       pr "  guestfs_message_error err;\n";
       let has_ret =
-	match fst style with
-	| RErr -> false
-	| RConstString _ | RConstOptString _ ->
+        match fst style with
+        | RErr -> false
+        | RConstString _ | RConstOptString _ ->
             failwithf "RConstString|RConstOptString cannot be used by daemon functions"
-	| RInt _ | RInt64 _
-	| RBool _ | RString _ | RStringList _
-	| RStruct _ | RStructList _
-	| RHashtable _ | RBufferOut _ ->
+        | RInt _ | RInt64 _
+        | RBool _ | RString _ | RStringList _
+        | RStruct _ | RStructList _
+        | RHashtable _ | RBufferOut _ ->
             pr "  struct %s_ret ret;\n" name;
-	    true in
+            true in

       pr "  int serial;\n";
       pr "  int r;\n";
@@ -4835,7 +4835,7 @@ check_state (guestfs_h *g, const char *caller)
       pr "\n";
       pr "  r = guestfs___recv (g, \"%s\", &hdr, &err,\n        " shortname;
       if not has_ret then
-	pr "NULL, NULL"
+        pr "NULL, NULL"
       else
         pr "(xdrproc_t) xdr_guestfs_%s_ret, (char *) &ret" shortname;
       pr ");\n";
--
1.6.5.rc2.177.ga9dd6




More information about the Libguestfs mailing list