[libvirt] [PATCH] util: consolidate duplicated error messages in pci.c

Eric Blake eblake at redhat.com
Thu Mar 8 21:57:49 UTC 2012


On 03/08/2012 02:53 PM, Laine Stump wrote:
> This is nearly identical to an earlier patch for virnetlink.c (after
> fixing it per Eric's recommendations).
> 
> There are special stub versions of all public functions in this file
> that are compiled when the platform isn't linux. Each of these
> functions had an almost identical message, differing only in the
> function name included in the message. Since log messages already
> contain the function name, we can just define a const char* with the
> common part of the string, and use that same string for all the log
> messages.
> 
> If nothing else, this at least makes for less strings that need
> translating...
> ---
>  src/util/pci.c |   23 +++++++++--------------
>  1 files changed, 9 insertions(+), 14 deletions(-)

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120308/fce950cc/attachment-0001.sig>


More information about the libvir-list mailing list