aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>2016-03-14 10:59:31 -0400
committerPhillip Lougher <phillip@squashfs.org.uk>2017-07-31 19:20:59 +0100
commitbc93faae0808feeb5d13dfb9d0cd872097b36c61 (patch)
tree6e2e2924815a4a53bd012a78f3a892a25aeeb638
parent713fb3c3305cb5e7ac5f743adc48e0319c4ad383 (diff)
downloadsquashfs-tools-bc93faae0808feeb5d13dfb9d0cd872097b36c61.tar.gz
unsquashfs: add code to dump the exact bytes used
The option to display the superblock information currently give a rounded value of the bytes used by the filesystem. There are use cases in which knowing the exact value is very valuable. This commit just adds this information.
-rw-r--r--squashfs-tools/unsquashfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
index b8a0ff3..835bd6a 100644
--- a/squashfs-tools/unsquashfs.c
+++ b/squashfs-tools/unsquashfs.c
@@ -1645,9 +1645,9 @@ void squashfs_stat(char *source)
printf("Creation or last append time %s", mkfs_str ? mkfs_str :
"failed to get time\n");
- printf("Filesystem size %.2f Kbytes (%.2f Mbytes)\n",
- sBlk.s.bytes_used / 1024.0, sBlk.s.bytes_used /
- (1024.0 * 1024.0));
+ printf("Filesystem size %llu bytes (%.2f Kbytes / %.2f Mbytes)\n",
+ sBlk.s.bytes_used, sBlk.s.bytes_used / 1024.0,
+ sBlk.s.bytes_used / (1024.0 * 1024.0));
if(sBlk.s.s_major == 4) {
printf("Compression %s\n", comp->name);