platform_check_ismounted switched to a getmntent() loop after
ustat disappeared on some new platforms.
We also use a similar mechanism for determining the
ro/rw-mounted status of a device in platform_check_iswritable.
Because the loops are essentially the same, factor them into a
single helper which accepts a VERBOSE flag to print info if the
device is found in the checked-for state, and a WRITABLE flag
which only checks specifically for a mounted and /writable/ device.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>