From: Andrew Cooper Subject: [PATCH 2/2] public/hvm_xs_strings.h: Fix ABI regression for OEM SMBios strings Date: Thu, 29 Aug 2013 20:20:57 +0100 Message-ID: <1377804057-14010-3-git-send-email-andrew.cooper3@citrix.com> References: <1377804057-14010-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377804057-14010-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Ian Jackson , Andrew Cooper , Keir Fraser , Ian Campbell , Jan Beulich List-Id: xen-devel@lists.xenproject.org The old code for OEM SMBios strings was: char path[20] = "bios-strings/oem-XX"; path[(sizeof path) - 3] = '0' + ((i < 10) ? i : i / 10); path[(sizeof path) - 2] = (i < 10) ? '\0' : '0' + (i % 10); Where oem-1 thru 9 specifically had no leading 0. However, the definition of HVM_XS_OEM_STRINGS specifically requires leading 0s. This regression was introduced by the combination of c/s 4d23036e709627 and e64c3f71ceb662 I realise that this patch causes a change to the public headers. However I feel it is justified as: * All toolstacks used to have to embed the magic string (and almost certainly still do) * If by some miriacle a new toolstack has started using the new define will continue to work. * The only intree consumer of the define is hvmloader itself. Signed-off-by: Andrew Cooper CC: Keir Fraser CC: Jan Beulich CC: Ian Campbell CC: Ian Jackson --- xen/include/public/hvm/hvm_xs_strings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/public/hvm/hvm_xs_strings.h b/xen/include/public/hvm/hvm_xs_strings.h index 4de5881..8aec935 100644 --- a/xen/include/public/hvm/hvm_xs_strings.h +++ b/xen/include/public/hvm/hvm_xs_strings.h @@ -75,6 +75,6 @@ /* 1 to 99 OEM strings can be set in xenstore using values of the form * below. These strings will be loaded into the SMBIOS type 11 structure. */ -#define HVM_XS_OEM_STRINGS "bios-strings/oem-%02d" +#define HVM_XS_OEM_STRINGS "bios-strings/oem-%d" #endif /* __XEN_PUBLIC_HVM_HVM_XS_STRINGS_H__ */ -- 1.7.10.4