diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-13 21:55:46 +0200 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-20 19:14:25 +0200 |
commit | 6d38bf593dae82da251514ac948c2d2381f0c6de (patch) | |
tree | 0f4cd7ae62f786084cf07f72f165cc87ed89eef1 | |
parent | bc57bada5249ba028d6535cacf905dbf0fe392dc (diff) | |
download | busybox-w32-6d38bf593dae82da251514ac948c2d2381f0c6de.tar.gz busybox-w32-6d38bf593dae82da251514ac948c2d2381f0c6de.tar.bz2 busybox-w32-6d38bf593dae82da251514ac948c2d2381f0c6de.zip |
win32: ls: skip DESKTOP support as block calculation is not supported EDIT
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
-rw-r--r-- | coreutils/ls.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index c7b2161db..717b3f493 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -795,6 +795,7 @@ static void showfiles(struct dnode **dn, unsigned nfiles) | |||
795 | } | 795 | } |
796 | 796 | ||
797 | 797 | ||
798 | #if !ENABLE_PLATFORM_MINGW32 | ||
798 | #if ENABLE_DESKTOP | 799 | #if ENABLE_DESKTOP |
799 | /* http://www.opengroup.org/onlinepubs/9699919799/utilities/ls.html | 800 | /* http://www.opengroup.org/onlinepubs/9699919799/utilities/ls.html |
800 | * If any of the -l, -n, -s options is specified, each list | 801 | * If any of the -l, -n, -s options is specified, each list |
@@ -823,6 +824,7 @@ static off_t calculate_blocks(struct dnode **dn) | |||
823 | return blocks >> 1; | 824 | return blocks >> 1; |
824 | } | 825 | } |
825 | #endif | 826 | #endif |
827 | #endif | ||
826 | 828 | ||
827 | 829 | ||
828 | static struct dnode **list_dir(const char *, unsigned *); | 830 | static struct dnode **list_dir(const char *, unsigned *); |
@@ -848,10 +850,12 @@ static void showdirs(struct dnode **dn, int first) | |||
848 | printf("%s:\n", (*dn)->fullname); | 850 | printf("%s:\n", (*dn)->fullname); |
849 | } | 851 | } |
850 | subdnp = list_dir((*dn)->fullname, &nfiles); | 852 | subdnp = list_dir((*dn)->fullname, &nfiles); |
853 | #if !ENABLE_PLATFORM_MINGW32 | ||
851 | #if ENABLE_DESKTOP | 854 | #if ENABLE_DESKTOP |
852 | if ((all_fmt & STYLE_MASK) == STYLE_LONG) | 855 | if ((all_fmt & STYLE_MASK) == STYLE_LONG) |
853 | printf("total %"OFF_FMT"u\n", calculate_blocks(subdnp)); | 856 | printf("total %"OFF_FMT"u\n", calculate_blocks(subdnp)); |
854 | #endif | 857 | #endif |
858 | #endif | ||
855 | if (nfiles > 0) { | 859 | if (nfiles > 0) { |
856 | /* list all files at this level */ | 860 | /* list all files at this level */ |
857 | dnsort(subdnp, nfiles); | 861 | dnsort(subdnp, nfiles); |