* [PATCH] time locale in gen_initramfs_list.sh
@ 2007-05-08 5:55 Florian Fainelli
2007-05-08 11:06 ` H. Peter Anvin
2007-05-10 0:09 ` Andrew Morton
0 siblings, 2 replies; 6+ messages in thread
From: Florian Fainelli @ 2007-05-08 5:55 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 417 bytes --]
I noticed that some zsh users who forced their ls formatting to something non
standard could not generate the initramfs file list. Forcing the locale to C
while generating seems not to be enough. Adding --time-style=locale will use
C locale ls output and will let them generate the initramfs list. It has no
side effects for other users.
Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>
--
[-- Attachment #1.2: time_locale.patch --]
[-- Type: text/plain, Size: 760 bytes --]
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
index 683eb12..1f96b9b 100644
--- a/scripts/gen_initramfs_list.sh
+++ b/scripts/gen_initramfs_list.sh
@@ -125,7 +125,7 @@ parse() {
str="${ftype} ${name} ${location} ${str}"
;;
"nod")
- local dev=`LC_ALL=C ls -l "${location}"`
+ local dev=`LC_ALL=C ls --time-style=locale -l "${location}"`
local maj=`field 5 ${dev}`
local min=`field 6 ${dev}`
maj=${maj%,}
@@ -135,7 +135,7 @@ parse() {
str="${ftype} ${name} ${str} ${dev} ${maj} ${min}"
;;
"slink")
- local target=`field 11 $(LC_ALL=C ls -l "${location}")`
+ local target=`field 11 $(LC_ALL=C ls --time-style=locale -l "${location}")`
str="${ftype} ${name} ${target} ${str}"
;;
*)
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] time locale in gen_initramfs_list.sh
2007-05-08 5:55 [PATCH] time locale in gen_initramfs_list.sh Florian Fainelli
@ 2007-05-08 11:06 ` H. Peter Anvin
2007-05-08 14:46 ` Florian Fainelli
2007-05-10 0:09 ` Andrew Morton
1 sibling, 1 reply; 6+ messages in thread
From: H. Peter Anvin @ 2007-05-08 11:06 UTC (permalink / raw)
To: Florian Fainelli; +Cc: linux-kernel
Florian Fainelli wrote:
> I noticed that some zsh users who forced their ls formatting to something non
> standard could not generate the initramfs file list. Forcing the locale to C
> while generating seems not to be enough. Adding --time-style=locale will use
> C locale ls output and will let them generate the initramfs list. It has no
> side effects for other users.
... except for those whose "ls" doesn't have "--time-style=locale"; how
long has that been implemented?
-hpa
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] time locale in gen_initramfs_list.sh
2007-05-08 11:06 ` H. Peter Anvin
@ 2007-05-08 14:46 ` Florian Fainelli
2007-05-08 22:34 ` Michael Mauch
0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2007-05-08 14:46 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 996 bytes --]
Hello Peter,
This is true. According to GNU fileutils changelog, the nearest Changelog
message regarding this option is :
2004-11-19 Alfred M. Szmidt <ams@gnu.org>
* src/ls.c (usage): Clarified description of --no-group (-G),
--human-readable (-h), --inode (-i), --size (-s), --time,
and --time-style.
Le mardi 8 mai 2007, H. Peter Anvin a écrit :
> Florian Fainelli wrote:
> > I noticed that some zsh users who forced their ls formatting to something
> > non standard could not generate the initramfs file list. Forcing the
> > locale to C while generating seems not to be enough. Adding
> > --time-style=locale will use C locale ls output and will let them
> > generate the initramfs list. It has no side effects for other users.
>
> ... except for those whose "ls" doesn't have "--time-style=locale"; how
> long has that been implemented?
>
> -hpa
--
Cordialement, Florian Fainelli
---------------------------------------------
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] time locale in gen_initramfs_list.sh
2007-05-08 14:46 ` Florian Fainelli
@ 2007-05-08 22:34 ` Michael Mauch
0 siblings, 0 replies; 6+ messages in thread
From: Michael Mauch @ 2007-05-08 22:34 UTC (permalink / raw)
To: linux-kernel
Florian Fainelli wrote:
> This is true. According to GNU fileutils changelog, the nearest Changelog
> message regarding this option is :
>
> 2004-11-19 Alfred M. Szmidt <ams@gnu.org>
>
> * src/ls.c (usage): Clarified description of --no-group (-G),
> --human-readable (-h), --inode (-i), --size (-s), --time,
> and --time-style.
It's also possible to overwrite that TIME_STYLE variable (which is
responsible for the format change), like so
LC_ALL=C TIME_STYLE=locale ls -l ...
Regards...
Michael
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] time locale in gen_initramfs_list.sh
2007-05-08 5:55 [PATCH] time locale in gen_initramfs_list.sh Florian Fainelli
2007-05-08 11:06 ` H. Peter Anvin
@ 2007-05-10 0:09 ` Andrew Morton
2007-05-10 2:08 ` Rob Landley
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2007-05-10 0:09 UTC (permalink / raw)
To: Florian Fainelli; +Cc: linux-kernel, Sam Ravnborg
On Tue, 8 May 2007 07:55:26 +0200
Florian Fainelli <florian.fainelli@int-evry.fr> wrote:
> I noticed that some zsh users who forced their ls formatting to something non
> standard could not generate the initramfs file list. Forcing the locale to C
> while generating seems not to be enough. Adding --time-style=locale will use
> C locale ls output and will let them generate the initramfs list. It has no
> side effects for other users.
>
> Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>
> --
>
>
> [time_locale.patch text/plain (761B)]
> diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
> index 683eb12..1f96b9b 100644
> --- a/scripts/gen_initramfs_list.sh
> +++ b/scripts/gen_initramfs_list.sh
> @@ -125,7 +125,7 @@ parse() {
> str="${ftype} ${name} ${location} ${str}"
> ;;
> "nod")
> - local dev=`LC_ALL=C ls -l "${location}"`
> + local dev=`LC_ALL=C ls --time-style=locale -l "${location}"`
> local maj=`field 5 ${dev}`
> local min=`field 6 ${dev}`
> maj=${maj%,}
> @@ -135,7 +135,7 @@ parse() {
> str="${ftype} ${name} ${str} ${dev} ${maj} ${min}"
> ;;
> "slink")
> - local target=`field 11 $(LC_ALL=C ls -l "${location}")`
> + local target=`field 11 $(LC_ALL=C ls --time-style=locale -l "${location}")`
> str="${ftype} ${name} ${target} ${str}"
> ;;
hm, --time-style sounds rather gnu-specific and perhaps we'd rather not
add that requirement. Or perhaps we already require gnu ls, dunno.
I'll dump the problem in Sam's lap ;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] time locale in gen_initramfs_list.sh
2007-05-10 0:09 ` Andrew Morton
@ 2007-05-10 2:08 ` Rob Landley
0 siblings, 0 replies; 6+ messages in thread
From: Rob Landley @ 2007-05-10 2:08 UTC (permalink / raw)
To: Andrew Morton; +Cc: Florian Fainelli, linux-kernel, Sam Ravnborg
On Wednesday 09 May 2007 8:09 pm, Andrew Morton wrote:
> hm, --time-style sounds rather gnu-specific and perhaps we'd rather not
> add that requirement. Or perhaps we already require gnu ls, dunno.
Running this sort of thing with busybox instead of the gnu tools is why I sent
the gawk/awk patches earlier. If a requirement for gnu ls has snuck in, it's
been within the last few months.
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-10 2:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-08 5:55 [PATCH] time locale in gen_initramfs_list.sh Florian Fainelli
2007-05-08 11:06 ` H. Peter Anvin
2007-05-08 14:46 ` Florian Fainelli
2007-05-08 22:34 ` Michael Mauch
2007-05-10 0:09 ` Andrew Morton
2007-05-10 2:08 ` Rob Landley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox