From 335d3cc6e18aaa24a792a998eff9032a78734a32 Mon Sep 17 00:00:00 2001 From: Jacek Kryszyn Date: Mon, 5 Feb 2024 15:49:56 +0100 Subject: [PATCH] Dynamic Partitions: fix bug related to maps having many extents A dynamic partition can consist of more than one extent. In such a case, parse-dynparts with --list-tables option would output one line per partition and partitions having many extents would have those extents separated with \n string. Such a line would be later echoed to dmsetup. Echo without -e does not break lines so the output directed to dmsetup would be incorrect. This patch fixes this problem. Change-Id: Ib8bc16c117b3233dd95cf6ac3abc01b26dacff72 --- scripts/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init.sh b/scripts/init.sh index d0e88ae..173bb4d 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -38,7 +38,7 @@ function map_from_super() { local part_name="$1" local part_table="$2" - echo "$part_table" | /usr/sbin/dmsetup create "$part_name" &>/dev/null + echo -e "$part_table" | /usr/sbin/dmsetup create "$part_name" &>/dev/null if [ $? = 0 ] then /usr/sbin/dmsetup mknodes "$part_name" -- 2.7.4