|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] XEN: use C locale in bootup message
There is a fairly extensive comment inline that explains what is going on,
but in a nutshell:
* LC_ALL=C is needed for date output
* LANG=C may be needed, at worst its harmless
* The scope of the settings needs to be global, not include/xen/compile.h
* export the variables for consistency sake
I have:
date (GNU coreutils) 5.97
GNU Make 3.81
And my locale set to Japanese (I can send details if anyone cares)
And in that environment Japanese text was ending up in
include/xen/compile.h, and coming out as complete garbage
on xen console over serial.
Signed-Off-By: Simon Horman <horms@xxxxxxxxxxxx>
xen/Makefile | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
--- x/xen/Makefile
+++ x/xen/Makefile
@@ -89,8 +89,23 @@ include/xen/acm_policy.h:
echo "#define ACM_DEFAULT_SECURITY_POLICY
$(ACM_DEFAULT_SECURITY_POLICY)"; \
echo "#endif") >$@
+# These variables need to be set to ensure that date (and possibly others)
+# produce information for include/xen/compile.h, which is able
+# to be displayed on a dumb console - the contents is displayed on boot.
+# Setting them local to include/xen/compile.h, as in the following
+# commented out line, does not work as the scope does not extend to
+# $(shell blah)
+#
+# include/xen/compile.h: LANG=C
+#
+# export isn't really neccessary, as if the variables are present in
+# the environment then they will be exported anyway. And if not there
+# is no need to set them at all. But it seems safe enough to consistently
+# export them to all child processes of this makefile.
+export LANG=C
+export LC_ALL=C
+
# compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
-include/xen/compile.h: LANG=C
include/xen/compile.h: include/xen/compile.h.in
@sed -e 's/@@date@@/$(shell date)/g' \
-e 's/@@time@@/$(shell date +%T)/g' \
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] XEN: use C locale in bootup message,
Horms <=
|
|
|
|
|