WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH] CA-34617: Ignore empty type-11 SMBIOS strings

To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH] CA-34617: Ignore empty type-11 SMBIOS strings
From: Rob Hoes <rob.hoes@xxxxxxxxxx>
Date: Thu, 5 Nov 2009 10:41:43 +0000
Delivery-date: Thu, 05 Nov 2009 02:41:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Rob Hoes <rob.hoes@xxxxxxxxxx>
CA-34617: Ignore empty type-11 SMBIOS strings

Empty Type-11 OEM strings will not be place in the host metadata and XenStore 
anymore.

Signed-off-by: Rob Hoes <rob.hoes@xxxxxxxxxx>

diff -r 268949f04063 ocaml/xapi/bios_strings.ml
--- a/ocaml/xapi/bios_strings.ml        Wed Nov 04 14:37:45 2009 +0000
+++ b/ocaml/xapi/bios_strings.ml        Thu Nov 05 10:20:49 2009 +0000
@@ -59,8 +59,10 @@
                                let c = String.index_from result b '\n' in
                                let str = "oem-" ^ (string_of_int index) in
                                let value = trim (remove_invisible (String.sub 
result (b+2) (c-b-2))) in
-                               print_endline value;
-                               (str, value) :: loop (index+1) c
+                               if value <> "" then
+                                       (str, value) :: loop (index+1) c
+                               else
+                                       loop index c
                        with _ -> []
                in
                standard @ (loop (n+1) 0)

Attachment: ca-34617
Description: Text document

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] CA-34617: Ignore empty type-11 SMBIOS strings, Rob Hoes <=