<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libguestfs.git/daemon/initrd.c, branch 1.2.6</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>daemon: Fix read-file so it fails gracefully for large files (RHBZ#589039).</title>
<updated>2010-05-14T16:06:06+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-05-07T12:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=988a707f3731e4174582e74fc83c30d89c5afb7e'/>
<id>988a707f3731e4174582e74fc83c30d89c5afb7e</id>
<content type='text'>
Pengzhen Cao noticed that read-file would fail for files
larger than the protocol size; this is *not* the bug.  However
it would also lose protocol synchronization after this.

The reason was that functions which return RBufferOut in the
generator must not 'touch' the *size_r parameter along error
return paths.

I fixed read-file and initrd-cat, and I checked that pread was
doing the right thing.

This also adds regression tests for read-file with various categories
of large file.
(cherry picked from commit 42f59b28f123f53ae038df23a9abee08e959e46b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pengzhen Cao noticed that read-file would fail for files
larger than the protocol size; this is *not* the bug.  However
it would also lose protocol synchronization after this.

The reason was that functions which return RBufferOut in the
generator must not 'touch' the *size_r parameter along error
return paths.

I fixed read-file and initrd-cat, and I checked that pread was
doing the right thing.

This also adds regression tests for read-file with various categories
of large file.
(cherry picked from commit 42f59b28f123f53ae038df23a9abee08e959e46b)
</pre>
</div>
</content>
</entry>
<entry>
<title>daemon: Don't need to prefix error messages with the command name.</title>
<updated>2010-02-12T16:49:00+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-02-12T14:06:25+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=e9c37113104c1cfb234535adc9b52ad3880a41ce'/>
<id>e9c37113104c1cfb234535adc9b52ad3880a41ce</id>
<content type='text'>
The RPC stubs already prefix the command name to error messages.
The daemon doesn't have to do this.  As a (small) benefit this also
makes the daemon slightly smaller.

Code in the daemon such as:

  if (argv[0] == NULL) {
    reply_with_error ("passed an empty list");
    return NULL;
  }

now results in error messages like this:

  &gt;&lt;fs&gt; command ""
  libguestfs: error: command: passed an empty list

(whereas previously you would have seen ..command: command:..)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The RPC stubs already prefix the command name to error messages.
The daemon doesn't have to do this.  As a (small) benefit this also
makes the daemon slightly smaller.

Code in the daemon such as:

  if (argv[0] == NULL) {
    reply_with_error ("passed an empty list");
    return NULL;
  }

now results in error messages like this:

  &gt;&lt;fs&gt; command ""
  libguestfs: error: command: passed an empty list

(whereas previously you would have seen ..command: command:..)
</pre>
</div>
</content>
</entry>
<entry>
<title>New API call: initrd-cat to list a file from an initrd.</title>
<updated>2010-02-09T12:26:22+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2010-02-09T12:26:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=e4fbe3e2cd130fa0b1b21a105729cd6ef32aac38'/>
<id>e4fbe3e2cd130fa0b1b21a105729cd6ef32aac38</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>daemon: Missing #includes revealed by cross-compiling.</title>
<updated>2009-11-20T10:36:21+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@redhat.com</email>
</author>
<published>2009-11-20T10:36:21+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=688bdc1a068a6c0bea58addd04d5bbe6dc1940c4'/>
<id>688bdc1a068a6c0bea58addd04d5bbe6dc1940c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>generator.ml: use new "Pathname" designation</title>
<updated>2009-08-13T12:45:34+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-11T13:59:56+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=84fc760439e82e6b3616abd0d1f9bd7d7eb01ec0'/>
<id>84fc760439e82e6b3616abd0d1f9bd7d7eb01ec0</id>
<content type='text'>
Nearly every file-related function in daemons/*.c is affected:
Remove this pair of statements from each affected do_* function:
-  NEED_ROOT (return -1);
-  ABS_PATH (dir, return -1);
and change the type of the corresponding parameter to "const char *".
* src/generator.ml: Emit NEED_ROOT just once, even when there are two or
more Pathname args.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nearly every file-related function in daemons/*.c is affected:
Remove this pair of statements from each affected do_* function:
-  NEED_ROOT (return -1);
-  ABS_PATH (dir, return -1);
and change the type of the corresponding parameter to "const char *".
* src/generator.ml: Emit NEED_ROOT just once, even when there are two or
more Pathname args.
</pre>
</div>
</content>
</entry>
<entry>
<title>update all NEED_ROOT uses</title>
<updated>2009-08-13T12:45:34+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-10T21:11:01+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=6bda071b5cd8393b37653687027c4ae6c6cf3804'/>
<id>6bda071b5cd8393b37653687027c4ae6c6cf3804</id>
<content type='text'>
run this command:
  git grep -l -w NEED_ROOT|xargs perl -pi -e \
    's/(NEED_ROOT) \((.*?)\)/$1 (return $2)/'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
run this command:
  git grep -l -w NEED_ROOT|xargs perl -pi -e \
    's/(NEED_ROOT) \((.*?)\)/$1 (return $2)/'
</pre>
</div>
</content>
</entry>
<entry>
<title>update all uses of ABS_PATH</title>
<updated>2009-08-13T12:45:34+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-10T17:03:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=0dd6c8c8442d4ff588f6dac2efab24d3409b0dec'/>
<id>0dd6c8c8442d4ff588f6dac2efab24d3409b0dec</id>
<content type='text'>
run this command:
  git grep -l -w ABS_PATH|xargs perl -pi -e \
    's/(?:ABS_PATH)( \(.*?,) (.*?)\)/ABS_PATH$1 return $2)/'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
run this command:
  git grep -l -w ABS_PATH|xargs perl -pi -e \
    's/(?:ABS_PATH)( \(.*?,) (.*?)\)/ABS_PATH$1 return $2)/'
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace shell_quote function with %Q and %R printf specifiers.</title>
<updated>2009-07-28T09:57:57+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@trick.home.annexia.org</email>
</author>
<published>2009-07-27T21:27:45+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=0f2e9c84e9ff1071260770930068642ecc8ac0d9'/>
<id>0f2e9c84e9ff1071260770930068642ecc8ac0d9</id>
<content type='text'>
%Q =&gt; simple shell quoted string
%R =&gt; path will be prefixed by /sysroot

eg. snprintf (cmd, sizeof cmd, "cat %R", path); system (cmd);
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
%Q =&gt; simple shell quoted string
%R =&gt; path will be prefixed by /sysroot

eg. snprintf (cmd, sizeof cmd, "cat %R", path); system (cmd);
</pre>
</div>
</content>
</entry>
<entry>
<title>Make /sysroot path configurable.</title>
<updated>2009-07-18T09:43:52+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@trick.home.annexia.org</email>
</author>
<published>2009-07-18T09:43:52+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=78029b529ad98769685d607230b70f71832d5906'/>
<id>78029b529ad98769685d607230b70f71832d5906</id>
<content type='text'>
Currently /sysroot is hard-coded throughout the daemon code.

This patch turns the path into a variable so that we can change
it in future, for example to allow standalone mode to be implemented.

This patch was tested by running all the C API tests successfully.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently /sysroot is hard-coded throughout the daemon code.

This patch turns the path into a variable so that we can change
it in future, for example to allow standalone mode to be implemented.

This patch was tested by running all the C API tests successfully.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove trailing blanks</title>
<updated>2009-07-03T15:04:21+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-07-03T09:53:49+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=a7b73d4a1e09f12b2002083618056f0c823c1dcf'/>
<id>a7b73d4a1e09f12b2002083618056f0c823c1dcf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
