daemon: Don't need to prefix error messages with the command name.

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:

  ><fs> command ""
  libguestfs: error: command: passed an empty list

(whereas previously you would have seen ..command: command:..)
This commit is contained in:
Richard Jones
2010-02-12 14:06:25 +00:00
parent 9b3ef85a3d
commit e9c3711310
42 changed files with 117 additions and 114 deletions

View File

@@ -46,7 +46,7 @@ do_glob_expand (const char *pattern)
if (r != 0) {
if (errno != 0)
reply_with_perror ("glob: %s", pattern);
reply_with_perror ("%s", pattern);
else
reply_with_error ("glob failed: %s", pattern);
return NULL;