<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libguestfs.git/daemon/debug.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: 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>use STREQ, not strcmp: part 1</title>
<updated>2009-11-09T21:34:16+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-09T13:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=9a8889e4d0c532b9f77af3a9cc7aae06adebfb83'/>
<id>9a8889e4d0c532b9f77af3a9cc7aae06adebfb83</id>
<content type='text'>
git grep -l 'strcmp *([^=]*== *0'|xargs \
  perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git grep -l 'strcmp *([^=]*== *0'|xargs \
  perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
</pre>
</div>
</content>
</entry>
<entry>
<title>convert uses of strcasecmp to STRCASEEQ</title>
<updated>2009-11-09T21:34:16+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-09T12:58:42+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=9353c6253d5fac1648b13ad9958468a2d9f6ad6f'/>
<id>9353c6253d5fac1648b13ad9958468a2d9f6ad6f</id>
<content type='text'>
git grep -l 'strcasecmp *([^=]*== *0'| xargs \
  perl -pi -e 's/\bstrcasecmp( *\(.*?\)) *== *0/STRCASEEQ$1/'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git grep -l 'strcasecmp *([^=]*== *0'| xargs \
  perl -pi -e 's/\bstrcasecmp( *\(.*?\)) *== *0/STRCASEEQ$1/'
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement 'debug ls' and 'debug ll' commands.</title>
<updated>2009-08-18T07:56:18+00:00</updated>
<author>
<name>Richard Jones</name>
<email>rjones@trick.home.annexia.org</email>
</author>
<published>2009-08-18T07:56:18+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=24a6cf4533118e04367f7fcdc6eadaa4e2dfbc56'/>
<id>24a6cf4533118e04367f7fcdc6eadaa4e2dfbc56</id>
<content type='text'>
These commands can be used to list files in the appliance.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These commands can be used to list files in the appliance.
</pre>
</div>
</content>
</entry>
<entry>
<title>adjust const "**" pointers to avoid warnings</title>
<updated>2009-08-17T09:40:24+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-07T07:38:37+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=adf20c0c4d9f488d55254f54a79079b9cacbde8d'/>
<id>adf20c0c4d9f488d55254f54a79079b9cacbde8d</id>
<content type='text'>
Also, ...
* src/generator.ml: Add DeviceList type, and propagate that change
out to all calling/interface code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, ...
* src/generator.ml: Add DeviceList type, and propagate that change
out to all calling/interface code.
</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>build: daemon/do_debug: parameters aren't always unused</title>
<updated>2009-08-10T10:49:22+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-10T10:17:00+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=92ac2400a326256ef819e0195d7ecfa7f03645be'/>
<id>92ac2400a326256ef819e0195d7ecfa7f03645be</id>
<content type='text'>
* daemon/debug.c (MAYBE_UNUSED): Define.
(do_debug): Mark parameters as unused only when they really
are unused.  Spotted by Richard Jones.

SCALAR(0xdd8370)
prefer sizeof *VAR sizeof TYPE (no semantic change)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* daemon/debug.c (MAYBE_UNUSED): Define.
(do_debug): Mark parameters as unused only when they really
are unused.  Spotted by Richard Jones.

SCALAR(0xdd8370)
prefer sizeof *VAR sizeof TYPE (no semantic change)
</pre>
</div>
</content>
</entry>
<entry>
<title>build: avoid warnings in daemon/debug.c</title>
<updated>2009-08-10T09:53:33+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-06T13:26:13+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=5b3452e99992ffb2cee7e6353243b553cdc74a46'/>
<id>5b3452e99992ffb2cee7e6353243b553cdc74a46</id>
<content type='text'>
* daemon/debug.c (do_debug): Mark parameters as unused.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* daemon/debug.c (do_debug): Mark parameters as unused.
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert all TABs-as-indentation to spaces.</title>
<updated>2009-08-03T15:17:57+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-03T15:10:13+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/rjones/public_git/libguestfs.git/commit/?id=2f1a50d81671810256dce0852e6b1e0810ac44af'/>
<id>2f1a50d81671810256dce0852e6b1e0810ac44af</id>
<content type='text'>
Do it by running this command:
[exempted files are matched via .x-sc_TAB_in_indentation]

  git ls-files \
    | pcregrep -vf .x-sc_TAB_in_indentation \
    | xargs pcregrep -l '^ *\t' \
    | xargs perl -MText::Tabs -ni -le \
      '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do it by running this command:
[exempted files are matched via .x-sc_TAB_in_indentation]

  git ls-files \
    | pcregrep -vf .x-sc_TAB_in_indentation \
    | xargs pcregrep -l '^ *\t' \
    | xargs perl -MText::Tabs -ni -le \
      '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
</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>
