public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 13/11] xfsprogs: Add a way to compile without blkid
Date: Fri, 14 Aug 2015 10:54:30 +1000	[thread overview]
Message-ID: <20150814005430.GS3902@dastard> (raw)
In-Reply-To: <1439475055-5519-1-git-send-email-jtulak@redhat.com>

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@redhat.com>

.....
> +#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@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2015-08-14  0:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 14:10 [PATCH 13/11] xfsprogs: Add a way to compile without blkid Jan Tulak
2015-08-14  0:54 ` Dave Chinner [this message]
2015-08-14  6:48   ` [PATCH 13/11 v2] " Jan Tulak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150814005430.GS3902@dastard \
    --to=david@fromorbit.com \
    --cc=jtulak@redhat.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox