[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH libguestfs] indent with spaces, not TABs



One more after this, and "make syntax-check" will pass once more.

>From 5c360133c0d4e09531d432abca0629798b87ff39 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Mon, 9 Nov 2009 15:14:53 +0100
Subject: [PATCH libguestfs] indent with spaces, not TABs

* HACKING: Expand indentation TABs.
* configure.ac: Likewise.
* daemon/daemon.h: Likewise.
* daemon/guestfsd.c: Likewise.
* fuse/guestmount.c: Likewise.
* hivex/LICENSE: Likewise.
* src/generator.ml: Likewise.
* tools/virt-win-reg: Likewise.
---
 HACKING            |    6 ++--
 configure.ac       |    4 +-
 daemon/daemon.h    |    6 ++--
 daemon/guestfsd.c  |   28 ++++++++++----------
 fuse/guestmount.c  |    2 +-
 hivex/LICENSE      |   12 ++++----
 src/generator.ml   |   18 +++++++-------
 tools/virt-win-reg |   68 ++++++++++++++++++++++++++--------------------------
 8 files changed, 72 insertions(+), 72 deletions(-)
 mode change 100755 => 100644 src/generator.ml

diff --git a/HACKING b/HACKING
index 5752ec3..9cc16c3 100644
--- a/HACKING
+++ b/HACKING
@@ -84,14 +84,14 @@ fish/
         Guestfish (the command-line program / shell)

 fuse/
-	FUSE (userspace filesystem) built on top of libguestfs.
+        FUSE (userspace filesystem) built on top of libguestfs.

 haskell/
         Haskell bindings.

 hivex/
-	Hive extraction library, for reading Windows Registry files.
-	See hivex/README for more details.
+        Hive extraction library, for reading Windows Registry files.
+        See hivex/README for more details.

 images/
         Some guest images to test against.  These are gzipped to save
diff --git a/configure.ac b/configure.ac
index 8587f46..e16ead8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -424,8 +424,8 @@ AC_SUBST([LIBXML2_LIBS])
 dnl FUSE is optional to build the FUSE module.
 HAVE_FUSE=yes
 PKG_CHECK_MODULES([FUSE],[fuse],,[
-	HAVE_FUSE=no
-	AC_MSG_WARN([FUSE library and headers are missing, so optional FUSE module won't be built])])
+        HAVE_FUSE=no
+        AC_MSG_WARN([FUSE library and headers are missing, so optional FUSE module won't be built])])
 AM_CONDITIONAL([HAVE_FUSE],[test "x$HAVE_FUSE" = "xyes"])

 dnl Check for OCaml (optional, for OCaml bindings).
diff --git a/daemon/daemon.h b/daemon/daemon.h
index dbdec3b..ccda8e3 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -55,13 +55,13 @@ extern void free_stringslen (char **argv, int len);
 #define COMMAND_FLAG_FOLD_STDOUT_ON_STDERR 1

 extern int commandf (char **stdoutput, char **stderror, int flags,
-		     const char *name, ...);
+                     const char *name, ...);
 extern int commandrf (char **stdoutput, char **stderror, int flags,
-		      const char *name, ...);
+                      const char *name, ...);
 extern int commandvf (char **stdoutput, char **stderror, int flags,
                       char const *const *argv);
 extern int commandrvf (char **stdoutput, char **stderror, int flags,
-		       char const* const *argv);
+                       char const* const *argv);

 extern char **split_lines (char *str);

diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index f1595e5..9c1b5c6 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -641,7 +641,7 @@ commandvf (char **stdoutput, char **stderror, int flags,
  */
 int
 commandrvf (char **stdoutput, char **stderror, int flags,
-	    char const* const *argv)
+            char const* const *argv)
 {
   int so_size = 0, se_size = 0;
   int so_fd[2], se_fd[2];
@@ -746,19 +746,19 @@ commandrvf (char **stdoutput, char **stderror, int flags,
       if (r == 0) { FD_CLR (se_fd[0], &rset); quit++; }

       if (r > 0) {
-	if (verbose)
-	  ignore_value (write (2, buf, r));
-
-	if (stderror) {
-	  se_size += r;
-	  p = realloc (*stderror, se_size);
-	  if (p == NULL) {
-	    perror ("realloc");
-	    goto quit;
-	  }
-	  *stderror = p;
-	  memcpy (*stderror + se_size - r, buf, r);
-	}
+        if (verbose)
+          ignore_value (write (2, buf, r));
+
+        if (stderror) {
+          se_size += r;
+          p = realloc (*stderror, se_size);
+          if (p == NULL) {
+            perror ("realloc");
+            goto quit;
+          }
+          *stderror = p;
+          memcpy (*stderror + se_size - r, buf, r);
+        }
       }
     }
   }
diff --git a/fuse/guestmount.c b/fuse/guestmount.c
index 04a6a29..2181a31 100644
--- a/fuse/guestmount.c
+++ b/fuse/guestmount.c
@@ -694,7 +694,7 @@ fg_release (const char *path, struct fuse_file_info *fi)

 /* Emulate this by calling sync. */
 static int fg_fsync(const char *path, int isdatasync,
-		     struct fuse_file_info *fi)
+                     struct fuse_file_info *fi)
 {
   int r;

diff --git a/hivex/LICENSE b/hivex/LICENSE
index fb885da..38dec6d 100644
--- a/hivex/LICENSE
+++ b/hivex/LICENSE
@@ -2,8 +2,8 @@ This is the license for the hivex library.

 ----------------------------------------------------------------------

-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999

  Copyright (C) 1991, 1999 Free Software Foundation, Inc.
      51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
@@ -14,7 +14,7 @@ This is the license for the hivex library.
  as the successor of the GNU Library Public License, version 2, hence
  the version number 2.1.]

-			    Preamble
+                            Preamble

   The licenses for most software are designed to take away your
 freedom to share and change it.  By contrast, the GNU General Public
@@ -116,7 +116,7 @@ modification follow.  Pay close attention to the difference between a
 former contains code derived from the library, whereas the latter must
 be combined with the library in order to run.
 
-		  GNU LESSER GENERAL PUBLIC LICENSE
+                  GNU LESSER GENERAL PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

   0. This License Agreement applies to any software library or other
@@ -436,7 +436,7 @@ decision will be guided by the two goals of preserving the free status
 of all derivatives of our free software and of promoting the sharing
 and reuse of software generally.

-			    NO WARRANTY
+                            NO WARRANTY

   15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
 WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -459,7 +459,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGES.

-		     END OF TERMS AND CONDITIONS
+                     END OF TERMS AND CONDITIONS
 
            How to Apply These Terms to Your New Libraries

diff --git a/src/generator.ml b/src/generator.ml
old mode 100755
new mode 100644
index 11322a6..3c1ff2b
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -4688,7 +4688,7 @@ and generate_xdr () =
            List.iter (
              function
              | Pathname n | Device n | Dev_or_Path n | String n ->
-		 pr "  string %s<>;\n" n
+                 pr "  string %s<>;\n" n
              | OptString n -> pr "  str *%s;\n" n
              | StringList n | DeviceList n -> pr "  str %s<>;\n" n
              | Bool n -> pr "  bool %s;\n" n
@@ -6581,11 +6581,11 @@ and generate_fish_cmds () =
           function
           | Device name
           | String name ->
-	      pr "  %s = argv[%d];\n" name i
+              pr "  %s = argv[%d];\n" name i
           | Pathname name
           | Dev_or_Path name ->
-	      pr "  %s = resolve_win_path (argv[%d]);\n" name i;
-	      pr "  if (%s == NULL) return -1;\n" name
+              pr "  %s = resolve_win_path (argv[%d]);\n" name i;
+              pr "  if (%s == NULL) return -1;\n" name
           | OptString name ->
               pr "  %s = STRNEQ (argv[%d], \"\") ? argv[%d] : NULL;\n"
                 name i i
@@ -7255,7 +7255,7 @@ copy_table (char * const * argv)
         | StringList n | DeviceList n ->
             pr "  ocaml_guestfs_free_strings (%s);\n" n;
         | Pathname _ | Device _ | Dev_or_Path _ | String _ | OptString _
-	| Bool _ | Int _ | Int64 _
+        | Bool _ | Int _ | Int64 _
         | FileIn _ | FileOut _ -> ()
       ) (snd style);

@@ -7506,7 +7506,7 @@ DESTROY (g)
         List.iter (
           function
           | Pathname _ | Device _ | Dev_or_Path _ | String _ | OptString _
-	  | Bool _ | Int _ | Int64 _
+          | Bool _ | Int _ | Int64 _
           | FileIn _ | FileOut _ -> ()
           | StringList n | DeviceList n -> pr "      free (%s);\n" n
         ) (snd style)
@@ -8160,8 +8160,8 @@ py_guestfs_close (PyObject *self, PyObject *args)
         | Bool _ -> pr "i" (* XXX Python has booleans? *)
         | Int _ -> pr "i"
         | Int64 _ -> pr "L" (* XXX Whoever thought it was a good idea to
-			     * emulate C's int/long/long long in Python?
-			     *)
+                             * emulate C's int/long/long long in Python?
+                             *)
       ) (snd style);
       pr ":guestfs_%s\",\n" name;
       pr "                         &py_g";
@@ -9129,7 +9129,7 @@ Java_com_redhat_et_libguestfs_GuestFS__1close
             pr "  free (%s);\n" n
         | Bool n
         | Int n
-	| Int64 n -> ()
+        | Int64 n -> ()
       ) (snd style);

       (* Check for errors. *)
diff --git a/tools/virt-win-reg b/tools/virt-win-reg
index d4329d1..e11ac34 100755
--- a/tools/virt-win-reg
+++ b/tools/virt-win-reg
@@ -167,9 +167,9 @@ my $i;

 for ($i = 0; $i < @ARGV; ++$i) {
     if (substr ($ARGV[$i], 0, 1) eq "\\") {
-	@lib_args = @ARGV[0 .. ($i-1)];
-	@ARGV = @ARGV[$i .. $#ARGV];
-	last;
+        @lib_args = @ARGV[0 .. ($i-1)];
+        @ARGV = @ARGV[$i .. $#ARGV];
+        last;
     }
 }

@@ -214,63 +214,63 @@ for ($i = 0; $i < @ARGV; ++$i) {
     $_ = $ARGV[$i];

     if (/^\\HKEY_LOCAL_MACHINE\\SAM(\\.*)/i) {
-	$winfile = "/windows/system32/config/sam";
-	$localhive = "$tmpdir/sam";
-	$path = $1;
+        $winfile = "/windows/system32/config/sam";
+        $localhive = "$tmpdir/sam";
+        $path = $1;
     }
     elsif (/^\\HKEY_LOCAL_MACHINE\\SECURITY(\\.*)/i) {
-	$winfile = "/windows/system32/config/security";
-	$localhive = "$tmpdir/security";
-	$path = $1;
+        $winfile = "/windows/system32/config/security";
+        $localhive = "$tmpdir/security";
+        $path = $1;
     }
     elsif (/^\\HKEY_LOCAL_MACHINE\\SOFTWARE(\\.*)/i) {
-	$winfile = "/windows/system32/config/software";
-	$localhive = "$tmpdir/software";
-	$path = $1;
+        $winfile = "/windows/system32/config/software";
+        $localhive = "$tmpdir/software";
+        $path = $1;
     }
     elsif (/^\\HKEY_LOCAL_MACHINE\\SYSTEM(\\.*)/i) {
-	$winfile = "/windows/system32/config/system";
-	$localhive = "$tmpdir/system";
-	$path = $1;
+        $winfile = "/windows/system32/config/system";
+        $localhive = "$tmpdir/system";
+        $path = $1;
     }
     elsif (/^\\HKEY_USERS\\.DEFAULT(\\.*)/i) {
-	$winfile = "/windows/system32/config/default";
-	$localhive = "$tmpdir/default";
-	$path = $1;
+        $winfile = "/windows/system32/config/default";
+        $localhive = "$tmpdir/default";
+        $path = $1;
     }
     else {
-	die "virt-win-reg: $_: not a supported Windows Registry path\n"
+        die "virt-win-reg: $_: not a supported Windows Registry path\n"
     }

     unless (-f $localhive) {
-	# Check the hive file exists and get the real name.
-	eval {
-	    $winfile = $g->case_sensitive_path ($winfile);
-	    $g->download ($winfile, $localhive);
-	};
-	if ($@) {
-	    die "virt-win-reg: $winfile: could not download registry file: $ \n"
-	}
+        # Check the hive file exists and get the real name.
+        eval {
+            $winfile = $g->case_sensitive_path ($winfile);
+            $g->download ($winfile, $localhive);
+        };
+        if ($@) {
+            die "virt-win-reg: $winfile: could not download registry file: $ \n"
+        }
     }

     # What sort of request is it?  Peek at the next arg.
     my $name; # will be: undefined, @ or a name
     if ($i+1 < @ARGV) {
-	if (substr ($ARGV[$i+1], 0, 1) ne "\\") {
-	    $name = $ARGV[$i+1];
-	    $i++;
-	}
+        if (substr ($ARGV[$i+1], 0, 1) ne "\\") {
+            $name = $ARGV[$i+1];
+            $i++;
+        }
     }

     my @cmd;
     if (defined $name) {
-	@cmd = ("hivexget", $localhive, $path, $name);
+        @cmd = ("hivexget", $localhive, $path, $name);
     } else {
-	@cmd = ("hivexget", $localhive, $path);
+        @cmd = ("hivexget", $localhive, $path);
     }

     system (@cmd) == 0
-	or die "hivexget command failed: $?\n";
+        or die "hivexget command failed: $?\n";
 }

 =head1 SEE ALSO
--
1.6.5.2.351.g0943


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]