Hi,

Although coreutils `ls` sort filenames with some complexity that does
not fit into busybox, IMHO busybox `ls` sorting should be
case-insensitive to better match it.

Patch attached.

Regards,
-- 
Pere
From ff0b33437641db29bbcef1aed15cb4edf41a0fe2 Mon Sep 17 00:00:00 2001
From: Pere Orga <[email protected]>
Date: Sat, 11 Feb 2012 01:58:16 +0100
Subject: [PATCH] ls: case-insensitive sort


Signed-off-by: Pere Orga <[email protected]>
---
 coreutils/ls.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/coreutils/ls.c b/coreutils/ls.c
index d5b25ee..bc4692e 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -899,7 +899,7 @@ static int sortcmp(const void *a, const void *b)
 		if (ENABLE_LOCALE_SUPPORT)
 			dif = strcoll(d1->name, d2->name);
 		else
-			dif = strcmp(d1->name, d2->name);
+			dif = strcasecmp(d1->name, d2->name);
 	}
 
 	/* Make dif fit into an int */
-- 
1.7.8.3

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to