Fix imageburner target file path validation to better support SD cards.

On some platforms, SD cards are mounted at /dev/mmcblk* rather than
/dev/sd* as currently expected. We replace prefix checking of the file
path to instead use regexes.

BUG=chromium:232897
TEST=unit tests and manual
Change-Id: Id26f96c9ba35bb7988f03c1dd7cac1ec79d6fc2d
Reviewed-on: https://gerrit.chromium.org/gerrit/60946
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Tested-by: Tim Song <tengs@chromium.org>
2 files changed