summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-02-01 12:18:35 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-02-02 10:23:03 +0000
commit59bb4bf3b4fbe2dd284b8be06b4738974238fac9 (patch)
tree7313b5d264ef50e66d44c8efc5f01d147a4d50bd /java
parent81b9aed9c312aaf844fc14321b6c504d106542c5 (diff)
downloadlibguestfs-59bb4bf3b4fbe2dd284b8be06b4738974238fac9.tar.gz
libguestfs-59bb4bf3b4fbe2dd284b8be06b4738974238fac9.tar.xz
libguestfs-59bb4bf3b4fbe2dd284b8be06b4738974238fac9.zip
Clarify the error message when unavailable functions are called (RHBZ#679737).
Callers are supposed to use the availability API to check for functions that may not be available in particular builds of libguestfs. If they don't do this, currently they tend to get obscure error messages, eg: libguestfs: error: zerofree: /dev/vda1: zerofree: No such file or directory This commit changes the error message to explain what callers ought to be doing instead: libguestfs: error: zerofree: feature 'zerofree' is not available in this build of libguestfs. Read 'AVAILABILITY' in the guestfs(3) man page for how to check for the availability of features. This patch makes the stubs check for availability. The stub code changes to: static void zerofree_stub (XDR *xdr_in) { [...] /* The caller should have checked before calling this. */ if (! optgroup_zerofree_available ()) { reply_with_error ("feature '%s' is not available in this\n" "build of libguestfs. Read 'AVAILABILITY' in the guestfs(3) man page for\n" "how to check for the availability of features.", "zerofree"); goto done; } [...] (cherry picked from commit 330fbea5b2d6bd7db84f7ea7afe87cf1bcd438e0)
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions