[libvirt] [PATCH 21/47] vircgroup: extract virCgroupV1(Set|Get)BlkioWeight

Ján Tomko jtomko at redhat.com
Tue Sep 25 08:00:29 UTC 2018


On Tue, Sep 18, 2018 at 05:45:42PM +0200, Pavel Hrdina wrote:
>Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
>---
> src/util/vircgroup.c        | 14 ++------------
> src/util/vircgroupbackend.h | 20 ++++++++++++++++++++
> src/util/vircgroupv1.c      | 29 +++++++++++++++++++++++++++++
> 3 files changed, 51 insertions(+), 12 deletions(-)
>
>@@ -161,4 +173,12 @@ virCgroupBackendRegister(virCgroupBackendPtr backend);
> virCgroupBackendPtr *
> virCgroupBackendGetAll(void);
>
>+# define VIR_CGROUP_BACKEND_CALL(group, func, ret, ...) \
>+    if (!group->backend->func) { \
>+        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", \
>+                       _("operation '" #func "' not supported")); \

_("operation '%s' not supported"), #func)

I don't think the function names are translatable. And having a separate
translatable string for each unlikely error message is a waste of
translators' time.

>+        return ret; \
>+    } \
>+    return group->backend->func(group, ##__VA_ARGS__);
>+
> #endif /* __VIR_CGROUP_BACKEND_H__ */

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180925/17f73560/attachment-0001.sig>


More information about the libvir-list mailing list