disk_layout_util: use losetup for GPT parsing when possible

Newer versions of losetup have a --partscan option which will create
partitions via the local GPT for us.  Use that when available so we're
more flexible with changing disk images (relative to the base layout).

BUG=None
TEST=created a VM image and used mount_image.sh

Change-Id: I115d769eac2710915ac098304969bdecbe25d317
Reviewed-on: https://chromium-review.googlesource.com/705759
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@google.com>
1 file changed