[Libvir] PATCH: 11/16: directory/fs/netfs backend
Jim Meyering
jim at meyering.net
Fri Feb 15 21:03:30 UTC 2008
"Daniel P. Berrange" <berrange at redhat.com> wrote:
...
> + if (virRun(conn, (char**)mntargv, NULL) < 0) {
> + free(src);
> + virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR, "cannot mount %s on %s: %d",
> + src, pool->def->target.path, strerror(errno));
format string mismatch. You probably wanted to include ", error" at the
end of the arg list, to match the trailing %d.
If this gets by gcc -Wformat then virStorageReportError needs the usual
__attribute__((printf business, too.
BTW, I've seen many cases where a diagnostic includes both
the string, strerrno(error), and the %d-formatted errno value.
Does anyone know why these diagnostics include the actual errno value?
More information about the libvir-list
mailing list