Use constants for partition numbers in update_bootloaders.sh

BUG=None
TEST=built and booted an image, ensured mounts were recognized

Change-Id: Iddd179edb94c048c5b6cc686e9b3ac871a6ca27f
Reviewed-on: https://chromium-review.googlesource.com/351250
Commit-Ready: Steven 'Steve' Kendall <skendall@neverware.com>
Tested-by: Steven 'Steve' Kendall <skendall@neverware.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/update_bootloaders.sh b/update_bootloaders.sh
index c81dce7..c5a5967 100755
--- a/update_bootloaders.sh
+++ b/update_bootloaders.sh
@@ -9,6 +9,7 @@
 
 SCRIPT_ROOT=$(dirname $(readlink -f "$0"))
 . "${SCRIPT_ROOT}/common.sh" || exit 1
+. ${BUILD_LIBRARY_DIR}/disk_layout_util.sh
 
 # Need to be inside the chroot to load chromeos-common.sh
 assert_inside_chroot
@@ -72,8 +73,8 @@
       dm_table=$(echo "$kernel_cmdline" | sed -s 's/.*dm="\([^"]*\)".*/\1/')
     fi
 
-    root_a_uuid="PARTUUID=$(part_index_to_uuid "$to" 3)"
-    root_b_uuid="PARTUUID=$(part_index_to_uuid "$to" 5)"
+    root_a_uuid="PARTUUID=$(part_index_to_uuid "$to" ${PARTITION_NUM_ROOT_A})"
+    root_b_uuid="PARTUUID=$(part_index_to_uuid "$to" ${PARTITION_NUM_ROOT_B})"
 
     # Rewrite grub table
     grub_dm_table_a=${dm_table//${old_root}/${root_a_uuid}}