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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 18, 2018 at 05:45:42PM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
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@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux