]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virPCIVPDResourceIsValidTextValue: Adjust comment to reflect actual code
authorPeter Krempa <pkrempa@redhat.com>
Wed, 24 Jan 2024 14:24:27 +0000 (15:24 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 31 Jan 2024 16:24:06 +0000 (17:24 +0100)
The function does not reject '&', '<', '>' contrary to what it actually
states. Move and adjust the comment.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virpcivpd.c

index 39557c73479a4d7ea87a7f89228ae612c4959b74..248a9b2790e0255b631299febcef69c0d65db32c 100644 (file)
@@ -167,19 +167,15 @@ virPCIVPDResourceGetFieldValueFormat(const char *keyword)
  * value or text field value. The expectations are based on the keywords specified
  * in relevant sections of PCI(e) specifications
  * ("I.3. VPD Definitions" in PCI specs, "6.28.1 VPD Format" PCIe 4.0).
+ *
+ * The PCI(e) specs mention alphanumeric characters when talking about text fields
+ * and the string resource but also include spaces and dashes in the provided example.
+ * Dots, commas, equal signs have also been observed in values used by major device vendors.
  */
 bool
 virPCIVPDResourceIsValidTextValue(const char *value)
 {
     size_t i = 0;
-    /*
-     * The PCI(e) specs mention alphanumeric characters when talking about text fields
-     * and the string resource but also include spaces and dashes in the provided example.
-     * Dots, commas, equal signs have also been observed in values used by major device vendors.
-     * The specs do not specify a full set of allowed code points and for Libvirt it is important
-     * to keep values in the ranges allowed within XML elements (mainly excluding less-than,
-     * greater-than and ampersand).
-     */
 
     if (value == NULL)
         return false;