On Thu, Aug 13, 2015 at 04:10:55PM +0200, Jan Tulak wrote:
> Because not all platforms have up-to-date blkid with required
> functions, allow at least partial functionality by adding
> --enable-blkid=yes/no optional configure argument.
>
> When blkid is disabled, signature detection and device geometry
> detection doesn't work.
>
> Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx>
.....
> +#else /* ifdef ENABLE_BLKID */
> +/*
> + * Without blkid, we can't do a good check for signatures.
> + * So instead of some messy attempts, just disable any checks
> + * and always return 'nothing found'.
> + */
> +static int
> +check_overwrite(
> + char *device)
> +{
> + return 0;
> +}
> +#endif /* ENABLE_BLKID */
I'd default the other way around, and always report that something
was found. That way we don't accidentally overwrite a block device
when someone fat-fingers the blockdev. It will mean you have to use
the force flag on OSX until such time that blkid is made to work,
but I think that's better than just overwriting the blockdev without
question....
Cheers,
Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx
|