| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This tool replaces virt-list-filesystems and virt-list-partitions with
a new tool written in C with a more uniform command line structure
and output.
This existing Perl tools are deprecated but remain indefinitely.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This now includes a product string, major and minor version,
hostname and even some applications.
|
|
|
|
|
|
|
|
| |
This converts the current Perl code in virt-inspector for
listing applications, into C, making it a part of the core API.
This is also capable of fetching the list of Windows applications
from the registry.
|
|
|
|
| |
Also add virt-cat.static target.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With changes in the core API since 1.5, virt-cat was little
more than a Perl wrapper which did some command line argument
processing. Thus it could easily be rewritten in C.
This version also shares core command line argument processing
with guestfish and guestmount, so the options have changed
slightly (old-style command line *is* supported).
virt-cat -a disk.img file [file ...]
virt-cat -d domname file [file ...]
Several other guestfish options are supported including encryption,
and with the new style multiple files can be downloaded. See the
man page for details.
|
|
|
|
|
|
|
|
| |
We were generating this dummy 'Fedora' image already in the
tools directory. It contains just enough Fedora-like files
to fool our inspection code and thus to test the tools.
This is general enough that we can use it everywhere.
|
|
|
|
|
| |
This removes the 'not-quite-separate' guestfs-actions.h and
guestfs-structs.h files.
|
|
|
|
|
| |
This API was dropped as there are some problems with it. This
commit adds the original test code, but commented out.
|
|
|
|
|
|
|
|
|
| |
This reverts commit 064569bcbf854a9cf588ce31851d987d5f114ec8.
This commit does the wrong thing: creating an empty ocaml/.depend
file is wrong because building the OCaml bindings will fail.
Not having this file will prevent automake from running. Therefore
this file has to exist with the correct content in git.
|
|
|
|
|
|
| |
This program is obsolete and the code has been reused for
guestfs-browser here:
http://people.redhat.com/~rjones/guestfs-browser/
|
|
|
|
|
|
|
|
| |
C# bindings were omitted entirely. Add a Makefile.am for this
directory even though we don't build these.
Because of a missing backslash, some POD files were not being
included.
|
|
|
|
|
|
| |
Existing command lookups are approx O(n^2). Replace this
with a perfect hash implementation which should be a lot
faster.
|
| |
|
|
|
|
|
|
|
| |
If either the daemon sends back an errno, or a system call
fails in the library, save the errno in the handle and then
make it available to callers through the guestfs_last_errno
function.
|
|
|
|
|
|
|
|
| |
This changes the protocol again so that if the errno is available,
it is converted to a string (like "EIO") and sent back over the
protocol to the library.
In this commit the library just discards the string.
|
| |
|
| |
|
|
|
|
| |
ocaml/.depend is automatically generated. This patch removes it from git.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This large commit changes the generator so that optional arguments
can be supported for functions.
The model for arguments (known as the "style") is changed from
(ret, args) to (ret, args, optargs) where optargs is a more limited
list of arguments.
One function has been added which takes optional arguments, it is
"add-drive-opts", modelled as:
(RErr, [String "filename"], #required
[Bool "readonly"; String "format"; String "iface"]) #optional
Note that this function is processed in the library (does not go over
the RPC protocol to the daemon). This has allowed us to simplify
the current implementation by omitting changes related to RPC or the
daemon, although we plan to add these at some point in the future.
From C this function can be called in 3 different ways as in these
examples:
guestfs_add_drive_opts (g, filename,
GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,
GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
-1);
(the argument(s) between 'filename' and '-1' are the optional ones).
guestfs_add_drive_opts_va (g, filename, args);
where 'args' is a va_list. This works like the first version.
struct guestfs_add_drive_opts_argv optargs = {
.bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK,
.readonly = 1,
}
guestfs_add_drive_opts_argv (g, filename, &optargs);
This last form lets you construct lists of optional arguments, and
is used by guestfish and the language bindings.
In guestfish optional arguments are used like this:
add-drive-opts filename readonly:true
In OCaml these are mapped naturally to OCaml optional arguments, eg:
g#add_drive_opts ~readonly:true filename;
In Perl these are mapped to extra arguments, eg:
$g->add_drive_opts ($filename, readonly => 1);
In Python these are mapped to optional arguments, eg:
g.add_drive_opts ("file", readonly = 1, format = "qcow2")
In Ruby these are mapped to a final hash argument, eg:
g.add_drive_opts("file", {})
g.add_drive_opts("file", :readonly => 1)
g.add_drive_opts("file", :readonly => 1, :iface => "virtio")
In PHP these are mapped to extra parameters. This is not quite
accurate since you cannot omit arbitrary optional parameters, but
there's not much than can be done within the limitations of PHP
as a language.
Unimplemented in: Haskell, C#, Java.
|
| |
|
|
|
|
|
|
| |
The guestfish-only commands such as 'alloc' and 'edit' are
now generated from one place in the generator instead of being
spread around ad-hoc in the C code.
|
|
|
|
|
|
|
|
|
|
| |
'src/generator.ml' is no more. Instead the generator is logically
split up over many different source files.
Read generator/README for help and tips.
We compile the generator down to bytecode, not native code. This
means it will run more slowly, but is done for maximum portability.
|
|
|
|
| |
This commit shouldn't change the semantics of the code.
|
|
|
|
|
|
| |
Note that these are not complete on 32 bit architectures. PHP doesn't
offer any convenient 64 bit type (on 32 bit). Therefore you should
always use these PHP bindings on 64 bit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses the optional po4a package to split these files into
PO files for translation, and reassemble afterwards.
Note this creates an extra pot file (po-docs/libguestfs-docs.pot).
We don't (yet) combine this with the main po/libguestfs.pot file.
The 'libguestfs-docs.pot' file included in this commit is not the
real thing, just a short cut down snippet for testing. The real
thing is created if you update one of the dependent files and
rebuild.
Note also the dummy ja.po, for testing the principles.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Rename these two generated files, in preparation for splitting
up the main src/guestfs.c file.
|
|
|
|
|
|
|
| |
These APIs allow you to change the device filter, the list of
block devices that LVM "sees". Either you can set it to a fixed
list of devices / partitions, or you can clear it so that LVM sees
everything.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a thread safety issue with the current OCaml bindings which
is well explained in the bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=604691
This commit fixes the safety issue by copying strings temporarily
before releasing the thread lock. Updated code looks like this:
char *filename = guestfs_safe_strdup (g, String_val (filenamev));
int r;
caml_enter_blocking_section ();
r = guestfs_add_drive_ro (g, filename);
caml_leave_blocking_section ();
free (filename);
if (r == -1)
ocaml_guestfs_raise_error (g, "add_drive_ro");
Also included is a regression test.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds additional tests to check that several types of parameter
including String are not NULL when passed to the C functions.
Previously this would cause a segfault inside libguestfs. With
this change, you get an error message / exception.
Of the possible pointer parameters, only OptString is now permitted
to be NULL.
This change does not affect the Perl bindings. This is because Perl
XS code was already adding similar checks if you passed undef into
a parameter expecting a string.
|
| |
|
|
|
|
|
|
|
|
|
| |
xgettext will only recognize '*.pl' as being a Perl file (otherwise
it treats it as a C file and does not correctly find any strings
in it).
This commit also fixes two actual bugs that xgettext found in the
strings in our Perl programs.
|
|
|
|
|
|
|
|
|
| |
I don't see a reason to autogenerate po/Makevars, and in the
earlier commit which changed this file to being autogenerated
we accidentally lost the special Perl keywords, copyright notice
and bug reporting address. Fix all of that.
This partially reverts commit febff9d2a35c4f40abbaf8943146476bdeac671e.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original idea (suggested by Al Viro) was to fork and chroot
into the sysroot and read the file from there. Because of the
separate process being chrooted, absolute links would be resolved
correctly. The slightly modified idea is to open the file in the
daemon process (but temporarily chrooted, so symlinks resolve
correctly), fork, and have the subprocess just be responsible for
copying the file. (Strictly speaking we don't need to fork, but
this implementation is simpler).
This commit just includes the changes needed to the command*()
functions in daemon/guestfsd.c and adds an absolute symlink to
the test ISO for testing it. Later commits will fix the broken
daemon commands themselves.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Virt-resize is the main contribution here, a program which can
be used to expand and shrink partitions in disk images.
Virt-list-partitions is used as an ancillary tool for planning
resize operations.
|
|
|
|
|
|
|
|
| |
For ARCHFLAGS change, see:
http://www.ruby-forum.com/topic/129717#579065
We also add a test for the <guestfs.h> header and include
that header when testing the library.
|