On Sat, Sep 02, 2006 at 05:23:30PM +0900, Horms wrote:
> On Fri, Sep 01, 2006 at 04:15:28PM +0100, Keir Fraser wrote:
> > On 1/9/06 2:25 am, "Horms" <horms@xxxxxxxxxxxx> wrote:
> >
> > > The reason that I went with a more general (sledge-hammer) approach as
> > > I'm not sure what other commands may be affected with other locales.
> > > But it is probably safe enough just to set LC_ALL for date. If you would
> > > like me to come up with a more minimal patch that fixes the problem for
> > > Japanese environments at least, and probably all environments, let me
> > > know. Its probably a bit easier for me to test than you.
> >
> > I'm just uneasy about a patch that is wider ranging than we need. I'd rather
> > just limit the LC_ALL to the invocation of date. If that works okay for you,
> > please send another patch.
>
> I thought about this a bit futher, and I think your uneasyness is
> well founded. I'll send a more minimal patch shortly.
Hi here is the somewhat obvious minimal patch. I tested it this
morning and it seems to work just fine in my environment, and I think
it should work in any environment.
The LANG=C is probably doing nothing, as for starters it
holds for the sed, figglet and mv invocations. I think
it can be safely removed. Sed is locale sensitive, but
I don't think it takes any notice of LANG.
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
XEN: use C locale in bootup message
LC_ALL=C is needed to ensure C locale output in date.
Without this locale-specific, and thus potentially
non-ascii data will end up in include/xen/compile.h which
is displayed on the (often only ascii capable) terminal
at bootup. In any case, its good to have a consistent bootup
message, regadless of the locale prevailing at build.
Signed-Off-By: Simon Horman <horms@xxxxxxxxxxxx>
xen/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
xen/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- x/xen/Makefile
+++ x/xen/Makefile
@@ -92,7 +92,7 @@ include/xen/acm_policy.h:
# 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' \
+ @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
-e 's/@@time@@/$(shell date +%T)/g' \
-e 's/@@whoami@@/$(shell whoami)/g' \
-e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] &&
/bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo
[unknown]))/g' \
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|