mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-20 20:53:46 +00:00
xforms: always put a newline at the end of config entries
Today the config.h/config.mk generators do not put a newline after an entry without a value, which causes the generated files ill-formed. This patch fixes the issue by putting a newline at the end of an entry unconditionally. Tracked-On: #6355 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
1ea67378f1
commit
0c7c5d3aeb
@ -43,18 +43,17 @@
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="$key" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$value != ''">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$value" />
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$default != ''">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$default" />
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="$newline" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="boolean-by-key-value">
|
||||
|
@ -41,13 +41,12 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="$value != ''">
|
||||
<xsl:value-of select="$value" />
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$default != ''">
|
||||
<xsl:value-of select="$default" />
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="$newline" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="boolean-by-key-value">
|
||||
|
@ -208,26 +208,26 @@
|
||||
<xsl:variable name="bus" select="substring-before($bdf, ':')" />
|
||||
<xsl:variable name="device" select="substring-before(substring-after($bdf, ':'), '.')" />
|
||||
<xsl:variable name="function" select="substring-after($bdf, '.')" />
|
||||
<xsl:variable name="serial_bdf">
|
||||
<xsl:text>0b</xsl:text>
|
||||
<xsl:call-template name="hex-to-bin">
|
||||
<xsl:with-param name="s" select="$bus" />
|
||||
<xsl:with-param name="width" select="4" />
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="hex-to-bin">
|
||||
<xsl:with-param name="s" select="$device" />
|
||||
<xsl:with-param name="width" select="1" />
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="hex-to-bin">
|
||||
<xsl:with-param name="s" select="$function" />
|
||||
<xsl:with-param name="width" select="3" />
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="integer-by-key-value">
|
||||
<xsl:with-param name="key" select="'SERIAL_PCI_BDF'" />
|
||||
<xsl:with-param name="value" select="$serial_bdf" />
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:text>0b</xsl:text>
|
||||
<xsl:call-template name="hex-to-bin">
|
||||
<xsl:with-param name="s" select="$bus" />
|
||||
<xsl:with-param name="width" select="4" />
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="hex-to-bin">
|
||||
<xsl:with-param name="s" select="$device" />
|
||||
<xsl:with-param name="width" select="1" />
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="hex-to-bin">
|
||||
<xsl:with-param name="s" select="$function" />
|
||||
<xsl:with-param name="width" select="3" />
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$integer-suffix" />
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="boolean-by-key-value">
|
||||
|
Loading…
Reference in New Issue
Block a user