File "lvs.ml", line 11... : Error: Unbound value Guestfs.create
by Jim Meyering
On F12, I'm getting this build failure:
ocamlfind ocamlopt -ccopt '-L ../../src/.libs' \
-warn-error A -I .. mlguestfs.cmxa lvs.ml -o lvs
File "lvs.ml", line 11, characters 10-24:
Error: Unbound value Guestfs.create
make[2]: *** [lvs] Error 2
Admittedly with STREQ-related changes, but they seem unrelated...
14 years, 11 months
[PATCH libguestfs] avoid "syntax-check" failure
by Jim Meyering
syntax-check failed with this:
fuse/guestmount.c:364: free ((char *) r);
maint.mk: don't cast free argument
make: *** [sc_cast_of_argument_to_free] Error 1
>From ed007e673b00ec545fcff2a708a57d98075c6460 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Mon, 9 Nov 2009 15:06:36 +0100
Subject: [PATCH libguestfs] avoid "syntax-check" failure
* fuse/guestmount.c (fg_readlink): Don't declare "r" as const,
as it is freed.
---
fuse/guestmount.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fuse/guestmount.c b/fuse/guestmount.c
index 910ec34..04a6a29 100644
--- a/fuse/guestmount.c
+++ b/fuse/guestmount.c
@@ -339,7 +339,7 @@ fg_access (const char *path, int mask)
static int
fg_readlink (const char *path, char *buf, size_t size)
{
- const char *r;
+ char *r;
int free_it = 0;
r = rlc_lookup (path);
@@ -361,7 +361,7 @@ fg_readlink (const char *path, char *buf, size_t size)
buf[len] = '\0';
if (free_it)
- free ((char *) r);
+ free (r);
return 0;
}
--
1.6.5.2.351.g0943
14 years, 11 months
[PATCH libguestfs] avoid syntax-check warning about isdigit use in example program
by Jim Meyering
With this, "make syntax-check" passes:
>From c7a0f37cb547bf6e5939df159a948f9eb5a56934 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Mon, 9 Nov 2009 18:01:48 +0100
Subject: [PATCH libguestfs] avoid syntax-check warning about isdigit use in example program
* .x-sc_avoid_ctype_macros: New file.
---
.x-sc_avoid_ctype_macros | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 .x-sc_avoid_ctype_macros
diff --git a/.x-sc_avoid_ctype_macros b/.x-sc_avoid_ctype_macros
new file mode 100644
index 0000000..8325007
--- /dev/null
+++ b/.x-sc_avoid_ctype_macros
@@ -0,0 +1 @@
+^examples/to-xml\.c$
--
1.6.5.2.351.g0943
14 years, 11 months
[PATCH libguestfs] indent with spaces, not TABs
by Jim Meyering
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(a)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
14 years, 11 months
[PATCH libguestfs] fix doc typo
by Jim Meyering
barely worth mentioning...
>From 459fa00dd144aef2c7287eb99354c9b39eaa62c3 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Mon, 9 Nov 2009 15:09:35 +0100
Subject: [PATCH libguestfs] fix doc typo
* fuse/guestmount.pod: Avoid "the the".
---
fuse/guestmount.pod | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fuse/guestmount.pod b/fuse/guestmount.pod
index 263959e..ee9a7c8 100644
--- a/fuse/guestmount.pod
+++ b/fuse/guestmount.pod
@@ -23,7 +23,7 @@ userspace") to make it appear as a mountable device.
Along with other options, you have to give at least one device (I<-a>
option) and at least one mountpoint (I<-m> option). How this works is
better explained in the L<guestfish(1)> manual page, or you can use
-L<virt-inspector(1)> and/or the the wrapper script
+L<virt-inspector(1)> and/or the wrapper script
C<guestmount-wrapper> to help you.
FUSE lets you mount filesystems as non-root. The mountpoint must be
--
1.6.5.2.351.g0943
14 years, 11 months
[PATCH libguestfs] placate 'make syntax-check'
by Jim Meyering
Similar:
hivex/hivex.c
maint.mk: the above files include <assert.h> but don't use it
make: *** [sc_prohibit_assert_without_use] Error 1
>From a71e5791293ac1e794fecffee8a2d616777f77e0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Mon, 9 Nov 2009 15:08:09 +0100
Subject: [PATCH libguestfs] placate 'make syntax-check'
* hivex/hivex.c: Remove unused "#include <assert.h>".
---
hivex/hivex.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/hivex/hivex.c b/hivex/hivex.c
index 40b5697..a2200a2 100644
--- a/hivex/hivex.c
+++ b/hivex/hivex.c
@@ -30,7 +30,6 @@
#include <iconv.h>
#include <sys/mman.h>
#include <sys/stat.h>
-#include <assert.h>
#ifdef HAVE_ENDIAN_H
#include <endian.h>
#endif
--
1.6.5.2.351.g0943
14 years, 11 months
[PATCH] Generic partition creation interface.
by Richard W.M. Jones
This creates a generic partition table interface. One immediate
advantage is that you can create GPT partitions which can be larger
than 2 TB.
For example, here is a 1 exabyte partition:
><fs> sparse /mnt/tmp/test/test.img 1E
><fs> run
><fs> part-init gpt /dev/vda
><fs> part-add /dev/vda primary 0 0
><fs> list-devices
/dev/vda
><fs> list-partitions
/dev/vda1
><fs> blockdev-getsize64 /dev/vda1
1099511627775983104
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
14 years, 11 months