* 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.
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
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).
#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);
*/
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];
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);
+ }
}
}
}
/* 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;
----------------------------------------------------------------------
- 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
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
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
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.
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
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
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 = strcmp (argv[%d], \"\") != 0 ? argv[%d] : NULL;\n"
name i i
| 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);
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)
| 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";
pr " free (%s);\n" n
| Bool n
| Int n
- | Int64 n -> ()
+ | Int64 n -> ()
) (snd style);
(* Check for errors. *)
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;
}
}
$_ = $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