<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libguestfs.git/src/launch.c, branch 1.5.23</title>
<subtitle>[MIRROR] library for accessing and modifying guest disk images</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/'/>
<entry>
<title>generator: Optional arguments, add-drive-opts (RHBZ#642934,CVE-2010-3851).</title>
<updated>2010-10-22T16:45:00+00:00</updated>
<author>
<name>Richard W.M. Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-10-20T10:34:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=14490c3e1aac61c6ac90f28828896683f64f0dc9'/>
<id>14490c3e1aac61c6ac90f28828896683f64f0dc9</id>
<content type='text'>
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, &amp;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-&gt;add_drive_opts ($filename, readonly =&gt; 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 =&gt; 1)
  g.add_drive_opts("file", :readonly =&gt; 1, :iface =&gt; "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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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, &amp;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-&gt;add_drive_opts ($filename, readonly =&gt; 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 =&gt; 1)
  g.add_drive_opts("file", :readonly =&gt; 1, :iface =&gt; "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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow $TMPDIR to override most temporary directory uses.</title>
<updated>2010-09-24T18:25:06+00:00</updated>
<author>
<name>Richard W.M. Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-09-24T17:54:37+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=c9c0ac7d362fd19214c2c5e5bb7dcd9059950887'/>
<id>c9c0ac7d362fd19214c2c5e5bb7dcd9059950887</id>
<content type='text'>
Be more consistent in allowing the user to override use of the
temporary directory by specifying $TMPDIR.  Also prefer P_tmpdir
macro (defined in &lt;stdio.h&gt;) if that is defined, rather than
hard-coding "/tmp" for the fallback location.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Be more consistent in allowing the user to override use of the
temporary directory by specifying $TMPDIR.  Also prefer P_tmpdir
macro (defined in &lt;stdio.h&gt;) if that is defined, rather than
hard-coding "/tmp" for the fallback location.
</pre>
</div>
</content>
</entry>
<entry>
<title>leak: Appliance name was leaked during guestfs_launch.</title>
<updated>2010-09-21T18:51:22+00:00</updated>
<author>
<name>Richard W.M. Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-09-21T18:37:24+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=6d276dae8d1bbb54d8708c94d23879d39f5fd4a3'/>
<id>6d276dae8d1bbb54d8708c94d23879d39f5fd4a3</id>
<content type='text'>
This frees the string containing the name of the appliance
which was previously being leaked during launch.

(Found by valgrind).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This frees the string containing the name of the appliance
which was previously being leaked during launch.

(Found by valgrind).
</pre>
</div>
</content>
</entry>
<entry>
<title>syntax: Remove unused ignore-value.h header.</title>
<updated>2010-09-10T21:57:52+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-09-10T21:55:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=21aac863e29eca5552c4ae1645306e966f11c1d8'/>
<id>21aac863e29eca5552c4ae1645306e966f11c1d8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>syntax: Remove unused c-ctype.h header.</title>
<updated>2010-09-10T21:57:52+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-09-10T21:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=a0b7045e0abb7e3a7ff4d1324f16e50de94bed55'/>
<id>a0b7045e0abb7e3a7ff4d1324f16e50de94bed55</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>syntax: Use spaces instead of tabs for indentation.</title>
<updated>2010-09-10T21:57:48+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-09-10T21:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=b4a3aec60ed4775f8ca2eb079e389af3a1769069'/>
<id>b4a3aec60ed4775f8ca2eb079e389af3a1769069</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add -nodefconfig command line option to qemu.</title>
<updated>2010-08-24T13:27:15+00:00</updated>
<author>
<name>Daniel Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2010-08-24T13:27:15+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=6d15d4e7c27477507ba355384a340ce86cec617b'/>
<id>6d15d4e7c27477507ba355384a340ce86cec617b</id>
<content type='text'>
Without this option, qemu will read some defaults from /etc/qemu/
configuration files.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without this option, qemu will read some defaults from /etc/qemu/
configuration files.
</pre>
</div>
</content>
</entry>
<entry>
<title>New APIs: set-network and get-network to enable network support.</title>
<updated>2010-08-24T11:37:54+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-08-24T10:53:40+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=4963be850090933e5769f9d3412d9eb86f522b1b'/>
<id>4963be850090933e5769f9d3412d9eb86f522b1b</id>
<content type='text'>
guestfs_set_network (g, true) enables network support in the appliance.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
guestfs_set_network (g, true) enables network support in the appliance.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use virtio-serial, remove other vmchannel methods.</title>
<updated>2010-08-24T10:54:37+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-08-23T20:53:32+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=866ec00d1f8bc40042795b66ceec12608bb1f9e8'/>
<id>866ec00d1f8bc40042795b66ceec12608bb1f9e8</id>
<content type='text'>
This adds support for virtio-serial, and removes all other
vmchannel methods.

Virtio-serial is faster than other methods, and is now widely
available.

I tested this by using the guestfs_upload API on an 83 MB file:
  before: 6.12 seconds (14.1 MB/sec)
   after: 4.20 seconds (20.6 MB/sec)
(note this is with the current 8K chunk size)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds support for virtio-serial, and removes all other
vmchannel methods.

Virtio-serial is faster than other methods, and is now widely
available.

I tested this by using the guestfs_upload API on an 83 MB file:
  before: 6.12 seconds (14.1 MB/sec)
   after: 4.20 seconds (20.6 MB/sec)
(note this is with the current 8K chunk size)
</pre>
</div>
</content>
</entry>
<entry>
<title>Change to using ext2-based, cached supermin appliance.</title>
<updated>2010-08-23T15:00:39+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-08-23T10:12:29+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=5c31f6126ba4ea3e9056c34c300f6f5e332ab997'/>
<id>5c31f6126ba4ea3e9056c34c300f6f5e332ab997</id>
<content type='text'>
This changes the method used to build the supermin appliance
to use the new ext2-based appliance supported by latest febootstrap.
The appliance can also be cached, so we avoid rebuilding it
each time it is used.

Mailing list discussion goes into the rationale and details:
https://www.redhat.com/archives/libguestfs/2010-August/msg00028.html

Requires febootstrap &gt;= 2.8.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This changes the method used to build the supermin appliance
to use the new ext2-based appliance supported by latest febootstrap.
The appliance can also be cached, so we avoid rebuilding it
each time it is used.

Mailing list discussion goes into the rationale and details:
https://www.redhat.com/archives/libguestfs/2010-August/msg00028.html

Requires febootstrap &gt;= 2.8.
</pre>
</div>
</content>
</entry>
</feed>
