summaryrefslogtreecommitdiff
path: root/src/btrfs-utils
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2017-03-30 14:53:06 -0400
committerAndrew Cady <d@jerkface.net>2017-03-30 14:53:06 -0400
commit7b05e86eeba8c1bb85380d015c3f6766f06976b1 (patch)
tree39cb3e5d2fadbb3e71ec73d59ab8e0968d273cf7 /src/btrfs-utils
parent404268d4947043c1eac6c41a31e1856830f5cc38 (diff)
fixup! split btrfs-shrink out of btarfs
Diffstat (limited to 'src/btrfs-utils')
-rwxr-xr-xsrc/btrfs-utils/btrfs-shrink2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/btrfs-utils/btrfs-shrink b/src/btrfs-utils/btrfs-shrink
index f3dbbb0..229b478 100755
--- a/src/btrfs-utils/btrfs-shrink
+++ b/src/btrfs-utils/btrfs-shrink
@@ -20,8 +20,8 @@ shrink()
20btrfs_truncate() 20btrfs_truncate()
21{ 21{
22 local img="$1" bytes 22 local img="$1" bytes
23 bytes=$(file "$img" | sed -ne 's?.*/\([0-9]*\)/[0-9]* bytes used.*?\1?p')
24# 548044800/1176715264 bytes used 23# 548044800/1176715264 bytes used
24 bytes=$(file "$img" | sed -ne 's?.*/\([0-9]*\) bytes used.*?\1?p')
25 if [ "$bytes" ]; then 25 if [ "$bytes" ]; then
26 truncate -s "$bytes" "$img" 26 truncate -s "$bytes" "$img"
27 fi 27 fi