diff options
author | Andrew Cady <d@jerkface.net> | 2017-03-30 14:53:06 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2017-03-30 14:53:06 -0400 |
commit | 7b05e86eeba8c1bb85380d015c3f6766f06976b1 (patch) | |
tree | 39cb3e5d2fadbb3e71ec73d59ab8e0968d273cf7 /src/btrfs-utils | |
parent | 404268d4947043c1eac6c41a31e1856830f5cc38 (diff) |
fixup! split btrfs-shrink out of btarfs
Diffstat (limited to 'src/btrfs-utils')
-rwxr-xr-x | src/btrfs-utils/btrfs-shrink | 2 |
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() | |||
20 | btrfs_truncate() | 20 | btrfs_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 |