indent with spaces, not TABs
authorJim Meyering <meyering@redhat.com>
Mon, 9 Nov 2009 14:14:53 +0000 (15:14 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 9 Nov 2009 19:19:42 +0000 (20:19 +0100)
* 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
configure.ac
daemon/daemon.h
daemon/guestfsd.c
fuse/guestmount.c
hivex/LICENSE
src/generator.ml [changed mode: 0755->0644]
tools/virt-win-reg

diff --git a/HACKING b/HACKING
index 5752ec3..9cc16c3 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -84,14 +84,14 @@ fish/
         Guestfish (the command-line program / shell)
 
 fuse/
         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/
 
 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
 
 images/
         Some guest images to test against.  These are gzipped to save
index 8587f46..e16ead8 100644 (file)
@@ -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],,[
 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).
 AM_CONDITIONAL([HAVE_FUSE],[test "x$HAVE_FUSE" = "xyes"])
 
 dnl Check for OCaml (optional, for OCaml bindings).
index bfdde9d..8912840 100644 (file)
@@ -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,
 #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,
 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,
 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);
 
 
 extern char **split_lines (char *str);
 
index b6c3c44..d16826f 100644 (file)
@@ -641,7 +641,7 @@ commandvf (char **stdoutput, char **stderror, int flags,
  */
 int
 commandrvf (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];
 {
   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 (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);
+        }
       }
     }
   }
       }
     }
   }
index 8812ac2..4547b3d 100644 (file)
@@ -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,
 
 /* 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;
 
 {
   int r;
 
index fb885da..38dec6d 100644 (file)
@@ -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
 
  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.]
 
  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
 
   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.
 \f
 former contains code derived from the library, whereas the latter must
 be combined with the library in order to run.
 \f
-                 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
    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.
 
 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.
 
   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.
 
 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGES.
 
-                    END OF TERMS AND CONDITIONS
+                     END OF TERMS AND CONDITIONS
 \f
            How to Apply These Terms to Your New Libraries
 
 \f
            How to Apply These Terms to Your New Libraries
 
old mode 100755 (executable)
new mode 100644 (file)
index d91fc24..17519fe
@@ -4688,7 +4688,7 @@ and generate_xdr () =
            List.iter (
              function
              | Pathname n | Device n | Dev_or_Path n | String n ->
            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
              | 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 ->
           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 ->
           | 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 = strcmp (argv[%d], \"\") != 0 ? argv[%d] : NULL;\n"
                 name i i
           | OptString name ->
               pr "  %s = strcmp (argv[%d], \"\") != 0 ? 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 _
         | 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);
 
         | FileIn _ | FileOut _ -> ()
       ) (snd style);
 
@@ -7506,7 +7506,7 @@ DESTROY (g)
         List.iter (
           function
           | Pathname _ | Device _ | Dev_or_Path _ | String _ | OptString _
         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)
           | 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
         | 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";
       ) (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
             pr "  free (%s);\n" n
         | Bool n
         | Int n
-       | Int64 n -> ()
+        | Int64 n -> ()
       ) (snd style);
 
       (* Check for errors. *)
       ) (snd style);
 
       (* Check for errors. *)
index d4329d1..e11ac34 100755 (executable)
@@ -167,9 +167,9 @@ my $i;
 
 for ($i = 0; $i < @ARGV; ++$i) {
     if (substr ($ARGV[$i], 0, 1) eq "\\") {
 
 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) {
     $_ = $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) {
     }
     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) {
     }
     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) {
     }
     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) {
     }
     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 {
     }
     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) {
     }
 
     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) {
     }
 
     # 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) {
     }
 
     my @cmd;
     if (defined $name) {
-       @cmd = ("hivexget", $localhive, $path, $name);
+        @cmd = ("hivexget", $localhive, $path, $name);
     } else {
     } else {
-       @cmd = ("hivexget", $localhive, $path);
+        @cmd = ("hivexget", $localhive, $path);
     }
 
     system (@cmd) == 0
     }
 
     system (@cmd) == 0
-       or die "hivexget command failed: $?\n";
+        or die "hivexget command failed: $?\n";
 }
 
 =head1 SEE ALSO
 }
 
 =head1 SEE ALSO