make_dev_ssd: support devices using /dev/dm-1 as root device.

Some devices may use rootdev=/dev/dm-1 as root device (the default one was
dm-0, according to build scripts). Running make_dev_ssd.sh
--remove_rootfs_verification on these devices will fail changing rootdev kernel
command line, and cause people not able to re-mount root device as writable.

To support running make_dev_ssd on these devices, we want to change the rootdev
pattern to dm[0-9].

BUG=chromium:428041.
TEST=make_dev_ssd.sh --remove_rootfs_verification
BRANCH=none

Change-Id: Idfd251c58e7d39b0b80ec1fc68989c2f49bdd1b2
Reviewed-on: https://chromium-review.googlesource.com/226782
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/image_signing/make_dev_ssd.sh b/scripts/image_signing/make_dev_ssd.sh
index 90fbb64..b5e9d7e 100755
--- a/scripts/image_signing/make_dev_ssd.sh
+++ b/scripts/image_signing/make_dev_ssd.sh
@@ -62,7 +62,7 @@
 remove_rootfs_verification() {
   local new_root="PARTUUID=%U/PARTNROFF=1"
   echo "$*" | sed '
-    s| root=/dev/dm-0 | root='"$new_root"' |
+    s| root=/dev/dm-[0-9] | root='"$new_root"' |
     s| dm_verity.dev_wait=1 | dm_verity.dev_wait=0 |
     s| payload=PARTUUID=%U/PARTNROFF=1 | payload=ROOT_DEV |
     s| hashtree=PARTUUID=%U/PARTNROFF=1 | hashtree=HASH_DEV |