util: Fix gem5img when used to manually unmount a disk image.
authorRichard Cooper <richard.cooper@arm.com>
Fri, 2 Oct 2020 16:50:07 +0000 (17:50 +0100)
committerRichard Cooper <richard.cooper@arm.com>
Mon, 1 Feb 2021 09:48:02 +0000 (09:48 +0000)
commitd8464eaa8000cf460b437cfd92f8e9a8b98a34aa
treec00167185b07dbc776ea58e94a28b95d97205f71
parent2bcab28c33c3844cb898ab22062a77e98f16a37c
util: Fix gem5img when used to manually unmount a disk image.

When unmounting a disk image manually using the
`gem5img umount mount_point` command, the operation can fail if the
process is unable to stat any of the mounts in the mount table. On
some systems this can occur even when running using sudo.

Added an exception check so any mount points that fail to stat will not
cause the whole script to terminate early.

Change-Id: I69cd2494ad0e8c989e19ecd8af8a811905cd6c09
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39897
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
util/gem5img.py