aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-13 21:55:18 +0200
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-20 19:14:25 +0200
commitbc57bada5249ba028d6535cacf905dbf0fe392dc (patch)
tree0afb562e05217a1dd8d6e1a405f4e6bf3ef23fcf
parentdd364c383a18fa5ef2f99a1cb26c5dd6dbfb31da (diff)
downloadbusybox-w32-bc57bada5249ba028d6535cacf905dbf0fe392dc.tar.gz
busybox-w32-bc57bada5249ba028d6535cacf905dbf0fe392dc.tar.bz2
busybox-w32-bc57bada5249ba028d6535cacf905dbf0fe392dc.zip
win32: ls: ignore stat.st_blocks on Windows
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
-rw-r--r--coreutils/ls.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 1197f7d71..c7b2161db 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -612,7 +612,12 @@ static NOINLINE unsigned list_single(const struct dnode *dn)
612 if (all_fmt & LIST_INO) 612 if (all_fmt & LIST_INO)
613 column += printf("%7llu ", (long long) dn->dstat.st_ino); 613 column += printf("%7llu ", (long long) dn->dstat.st_ino);
614 if (all_fmt & LIST_BLOCKS) 614 if (all_fmt & LIST_BLOCKS)
615#if ENABLE_PLATFORM_MINGW32
616 /* MinGW does not have st_blocks */
617 column += printf("%4"OFF_FMT"u ", (off_t)0);
618#else
615 column += printf("%4"OFF_FMT"u ", (off_t) (dn->dstat.st_blocks >> 1)); 619 column += printf("%4"OFF_FMT"u ", (off_t) (dn->dstat.st_blocks >> 1));
620#endif
616 if (all_fmt & LIST_MODEBITS) 621 if (all_fmt & LIST_MODEBITS)
617 column += printf("%-10s ", (char *) bb_mode_string(dn->dstat.st_mode)); 622 column += printf("%-10s ", (char *) bb_mode_string(dn->dstat.st_mode));
618 if (all_fmt & LIST_NLINKS) 623 if (all_fmt & LIST_NLINKS)