virt-v2v error - Fedora 16
by DE Clay
Trying to test virt-v2v using ESX. Running Fedora 16 and virt-v2v
0.8.5.
Command invocation:
virt-v2v -ic esx://testhostname/?no_verify=1 -os testpool --network
default testvm
Result:
Invalid configuration of Net::HTTPS
at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Transfer/ESX.pm line 68.
Couldn't find a resolution to this issue on the net. Please assist.
12 years, 9 months
[PATCH 1/2] examples: code cleanups
by Wanlong Gao
do a code cleanup by removing the tailing spaces
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
examples/create_disk.c | 2 +-
examples/inspect_vm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/create_disk.c b/examples/create_disk.c
index f4b9044..bcad6d8 100644
--- a/examples/create_disk.c
+++ b/examples/create_disk.c
@@ -7,7 +7,7 @@
#include <unistd.h>
#include <guestfs.h>
-int
+int
main (int argc, char *argv[])
{
guestfs_h *g;
diff --git a/examples/inspect_vm.c b/examples/inspect_vm.c
index 6c45aac..5a61904 100644
--- a/examples/inspect_vm.c
+++ b/examples/inspect_vm.c
@@ -21,7 +21,7 @@ count_strings (char *const *argv)
return c;
}
-int
+int
main (int argc, char *argv[])
{
guestfs_h *g;
--
1.7.9
12 years, 9 months
[PATCH] guestmount: use O_ACCMODE instead of hard coding
by Wanlong Gao
Change hard code 3 to O_ACCMODE.
it'll be more sensible.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
fuse/guestmount.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fuse/guestmount.c b/fuse/guestmount.c
index bd7ba50..a9bf4e3 100644
--- a/fuse/guestmount.c
+++ b/fuse/guestmount.c
@@ -583,7 +583,7 @@ fg_open (const char *path, struct fuse_file_info *fi)
{
TRACE_CALL ("%s, 0%o", path, fi->flags);
- int flags = fi->flags & 3;
+ int flags = fi->flags & O_ACCMODE;
if (read_only && flags != O_RDONLY)
return -EROFS;
--
1.7.9.rc2
12 years, 9 months
[PATCH] guestmount: remove tailing spaces
by Wanlong Gao
just do a cleanup.
remove the tailing spaces.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
fuse/guestmount.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fuse/guestmount.c b/fuse/guestmount.c
index 66baf92..bd7ba50 100644
--- a/fuse/guestmount.c
+++ b/fuse/guestmount.c
@@ -582,7 +582,7 @@ static int
fg_open (const char *path, struct fuse_file_info *fi)
{
TRACE_CALL ("%s, 0%o", path, fi->flags);
-
+
int flags = fi->flags & 3;
if (read_only && flags != O_RDONLY)
@@ -596,7 +596,7 @@ fg_read (const char *path, char *buf, size_t size, off_t offset,
struct fuse_file_info *fi)
{
TRACE_CALL ("%s, %p, %zu, %ld", path, buf, size, (long) offset);
-
+
char *r;
size_t rsize;
--
1.7.9.rc2
12 years, 9 months
[PATCH] daemon: Fix crash in aug-defnode (RHBZ#785668).
by Richard W.M. Jones
From: "Richard W.M. Jones" <rjones(a)redhat.com>
---
daemon/augeas.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/daemon/augeas.c b/daemon/augeas.c
index 83d24ad..f52c091 100644
--- a/daemon/augeas.c
+++ b/daemon/augeas.c
@@ -141,18 +141,27 @@ guestfs_int_int_bool *
do_aug_defnode (const char *name, const char *expr, const char *val)
{
#ifdef HAVE_AUG_DEFNODE
- static guestfs_int_int_bool r;
- int created;
+ guestfs_int_int_bool *r;
+ int i, created;
NEED_AUG (NULL);
- r.i = aug_defnode (aug, name, expr, val, &created);
- if (r.i == -1) {
+ i = aug_defnode (aug, name, expr, val, &created);
+ if (i == -1) {
reply_with_error ("Augeas defnode failed");
return NULL;
}
- r.b = created;
- return &r;
+
+ r = malloc (sizeof *r);
+ if (r == NULL) {
+ reply_with_perror ("malloc");
+ return NULL;
+ }
+
+ r->i = i;
+ r->b = created;
+
+ return r;
#else
NOT_AVAILABLE (NULL);
#endif
--
1.7.6
12 years, 9 months
[PATCH] Fix for udev >= 176
by Richard W.M. Jones
I've pushed this upstream already, since Fedora Rawhide doesn't work
without this patch. I'm posting here for the benefit of other distros
that might hit this problem.
Rich.
12 years, 10 months
[PATCH 1/2] gobject: Allow RConstOptString to return an error
by Matthew Booth
RConstOptString cannot return an error in the C api. This makes it a special
case for the GObject api, as all other return types have a corresponding GError
**err argument to return an error. This change removes this special case, and
includes the possibility of an error return in the API. An error is indicated by
setting *err to a non-NULL value.
This change is in preparation for adding a close api. An attempt to call any
api, even RConstOptString, on a closed handle must return an error.
---
generator/generator_gobject.ml | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/generator/generator_gobject.ml b/generator/generator_gobject.ml
index 4779f23..2b88274 100644
--- a/generator/generator_gobject.ml
+++ b/generator/generator_gobject.ml
@@ -37,10 +37,6 @@ let camel_of_name flags name =
a ^ String.uppercase (Str.first_chars b 1) ^ Str.string_after b 1
) "" (Str.split (regexp "_") name)
-let returns_error = function
- | RConstOptString _ -> false
- | _ -> true
-
let generate_gobject_proto name ?(single_line = true)
(ret, args, optargs) flags =
let spacer = if single_line then " " else "\n" in
@@ -109,7 +105,7 @@ let generate_gobject_proto name ?(single_line = true)
| _ -> ());
if List.exists (function Cancellable -> true | _ -> false) flags then
pr ", GCancellable *cancellable";
- if returns_error ret then pr ", GError **err";
+ pr ", GError **err";
pr ")"
let generate_gobject_header_static () =
@@ -780,7 +776,7 @@ let generate_gobject_c_methods () =
(* Check return, throw error if necessary, marshall return value *)
- if returns_error ret then (
+ if match ret with RConstOptString _ -> false | _ -> true then (
pr " if (ret == %s) {\n"
(match ret with
| RErr | RInt _ | RInt64 _ | RBool _ ->
--
1.7.7.5
12 years, 10 months
[PATCH] gobject: Add a TODO list
by Matthew Booth
---
gobject/TODO.txt | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
create mode 100644 gobject/TODO.txt
diff --git a/gobject/TODO.txt b/gobject/TODO.txt
new file mode 100644
index 0000000..7ac64da
--- /dev/null
+++ b/gobject/TODO.txt
@@ -0,0 +1,9 @@
+Tasks required before the GObject bindings can be considered complete:
+
+* Fix the problem of inspect_get_type
+* Build the gtkdoc and make it available to the developer
+* Bind the libguestfs events API
+
+Tasks which would improve the usability of the GObject bindings:
+
+* Implement _async versions of all apis
--
1.7.7.5
12 years, 10 months
example script for GObject
by Hilko Bengen
I tried using Javascript (gjs) with GObject-Introspection and did a port
of the create_disk example which is attached below.
Quite a bit of time was spent looking up stuff in the GLib reference and
guessing how certain idioms translate to gjs.
I used the traditional add_drive_opts method since I haven't been able
to find how to specify the optional arguments to add_drive_opts. How
does that work?
Cheers,
-Hilko
12 years, 10 months