summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell/print-ls.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2010-02-01 00:03:02 +0000
committerChris Johns <chrisj@rtems.org>2010-02-01 00:03:02 +0000
commit42c4de823f3c6069240c5fa97e57a274372d4e61 (patch)
tree9531359f1bf8bf08d993cb45c9ea7ce60021e829 /cpukit/libmisc/shell/print-ls.c
parentFixed invalid chain extract (diff)
downloadrtems-42c4de823f3c6069240c5fa97e57a274372d4e61.tar.bz2
2010-02-01 Chris Johns <chrisj@rtems.org>
* libmisc/shell/fts.c: Updated to the latest NetBSD version to resolve heap allocation bugs. * libmisc/shell/main_ls.c, libmisc/shell/print-ls.c: Fix printing size bugs. * libnetworking/rtems/mkrootfs.c: Fix byte order bug when creating the loopback interface address.
Diffstat (limited to 'cpukit/libmisc/shell/print-ls.c')
-rw-r--r--cpukit/libmisc/shell/print-ls.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cpukit/libmisc/shell/print-ls.c b/cpukit/libmisc/shell/print-ls.c
index dc449f558f..192d8f11b8 100644
--- a/cpukit/libmisc/shell/print-ls.c
+++ b/cpukit/libmisc/shell/print-ls.c
@@ -161,11 +161,13 @@ printlong(rtems_shell_ls_globals* globals, DISPLAY *dp)
(void)printf("%*s ", dp->s_size, szbuf);
} else {
#endif
- (void)printf("%*llu ", dp->s_size,
- (long long)sp->st_size);
-#if RTEMS_REMOVED
+ {
+ unsigned long long size = sp->st_blocks;
+ size *= sp->st_blksize;
+ if (size < 0x100000000ULL)
+ size = sp->st_size;
+ (void)printf("%*llu ", dp->s_size, size);
}
-#endif
if (f_accesstime)
printtime(globals, sp->st_atime);
else if (f_statustime)