Re: [libvirt PATCH v4 4/5] conf: introduce support for Fibre Channel VMID

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

 



On Tue, Aug 17, 2021 at 12:38:09PM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
docs/formatdomain.rst                         | 21 ++++++++++++
docs/schemas/domaincommon.rng                 | 14 ++++++++
src/conf/domain_conf.c                        |  9 ++++-
src/conf/domain_conf.h                        |  1 +
src/conf/domain_validate.c                    | 34 +++++++++++++++++++
.../fibrechannel-appid.xml                    | 21 ++++++++++++
tests/genericxml2xmltest.c                    |  2 ++
7 files changed, 101 insertions(+), 1 deletion(-)
create mode 100644 tests/genericxml2xmlindata/fibrechannel-appid.xml

diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index a9e4519b1a..d656716ea9 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -55,6 +55,37 @@ virDomainDefBootValidate(const virDomainDef *def)
}


+#define APPID_LEN_MIN 1
+#define APPID_LEN_MAX 128
+
+static int
+virDomainDefResourceValidate(const virDomainDef *def)
+{
+    if (!def->resource)
+        return 0;
+
+    if (def->resource->appid) {
+        int len;
+
+        if (!virStringIsPrintable(def->resource->appid)) {
+            virReportError(VIR_ERR_XML_ERROR, "%s",
+                           _("Fibre Channel 'appid' is not printable string"));

"not a printable string"

Reviewed-by: Martin Kletzander <mkletzan@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature


[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