From: Peter Krempa Date: Wed, 5 Dec 2018 13:33:30 +0000 (+0100) Subject: util: error: Improve docs for virErrorMsg X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=de4cbbb556991251de7d823f6abb2934db464d05;p=libvirt.git util: error: Improve docs for virErrorMsg Clarify how @info is used and what the returned values look like. Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- diff --git a/src/util/virerror.c b/src/util/virerror.c index db1bfcfbd8..ecfd8d748a 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -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)