]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: error: Improve docs for virErrorMsg
authorPeter Krempa <pkrempa@redhat.com>
Wed, 5 Dec 2018 13:33:30 +0000 (14:33 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 14 Dec 2018 12:57:00 +0000 (13:57 +0100)
Clarify how @info is used and what the returned values look like.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/util/virerror.c

index db1bfcfbd8a2c754af680ec58ef359b1afbedb36..ecfd8d748a08b9378764d89f2c29ec03dc8c67b4 100644 (file)
@@ -905,12 +905,14 @@ void virRaiseErrorObject(const char *filename,
 /**
  * virErrorMsg:
  * @error: the virErrorNumber
- * @info: usually the first parameter string
+ * @info: additional info string
  *
- * Internal routine to get the message associated to an error raised
- * from the library
+ * Internal routine to get the message associated to @error raised
+ * from the library.
  *
- * Returns the constant string associated to @error
+ * Returns a *printf format string which describes @error. The returned string
+ * contains exactly one '%s' modifier if @info is non-NULL, or no modifiers at
+ * all if @info is NULL. If @error is invalid NULL is returned.
  */
 const char *
 virErrorMsg(virErrorNumber error, const char *info)