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-09-10 19:49:31 +1000 |
commit | 0f02032c5da392f8868a6c91f3023a715a3a6ff8 (patch) | |
tree | 32d62ea815d3a09695fb1dcfcb0585b35834a936 | |
parent | 970b17acd321b27dfb81d0a9447cc8404d6d602e (diff) | |
download | busybox-w32-0f02032c5da392f8868a6c91f3023a715a3a6ff8.tar.gz busybox-w32-0f02032c5da392f8868a6c91f3023a715a3a6ff8.tar.bz2 busybox-w32-0f02032c5da392f8868a6c91f3023a715a3a6ff8.zip |
win32: ls: skip DESKTOP support as block calculation is not supported EDIT
-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); |