summaryrefslogtreecommitdiff
path: root/loop-layer.sh
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-04-29 14:36:26 -0400
committerAndrew Cady <d@jerkface.net>2016-04-29 14:36:30 -0400
commit153d299a41b9be4e15dab1ca29bb93a74bd2445d (patch)
tree96fbfbe7c64f0b3f02f3d755e2b129917785bb98 /loop-layer.sh
parent5f41fb879ca830e5ad3345878e59072f3d6573bc (diff)
fix paths (in progress)
Diffstat (limited to 'loop-layer.sh')
-rw-r--r--loop-layer.sh15
1 files changed, 0 insertions, 15 deletions
diff --git a/loop-layer.sh b/loop-layer.sh
deleted file mode 100644
index 7e08e12..0000000
--- a/loop-layer.sh
+++ /dev/null
@@ -1,15 +0,0 @@
1losetup_snapshot()
2{
3 local ro_dev rw_dev new_dev_name size persist chunksize
4 ro_file=$1
5 rw_file=$2
6
7 ro_dev=$(LoSetup -r -f --show "$ro_file") || return
8 rw_dev=$(LoSetup -f --show "$rw_file") || return
9 new_dev_name=${ro_dev##*/}
10 size=$(blockdev --getsz "$ro_dev") || return
11 persist=p
12 chunksize=16
13 dmsetup create "$new_dev_name" --table "0 $size snapshot $ro_dev $rw_dev $persist $chunksize" || return
14 echo /dev/mapper/"$new_dev_name"
15}