public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [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

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