| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | Re: [PATCH 02/19] mkfs: sanitise ftype parameter values. |
| From: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
| Date: | Thu, 24 Mar 2016 11:33:44 -0500 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1458818136-56043-3-git-send-email-jtulak@xxxxxxxxxx> |
| References: | <1458818136-56043-1-git-send-email-jtulak@xxxxxxxxxx> <1458818136-56043-3-git-send-email-jtulak@xxxxxxxxxx> |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 |
On 3/24/16 6:15 AM, jtulak@xxxxxxxxxx wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
>
> Because passing "-n ftype=2" should fail.
but passing crc=1 ftype=1 shouldn't fail, should it?
Seems like it will here.
-Eric
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx>
> Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>
> ---
> mkfs/xfs_mkfs.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index 36e5b4f..979a860 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -1596,7 +1596,15 @@ main(
> reqval('n', nopts, N_FTYPE);
> if (nftype)
> respec('n', nopts, N_FTYPE);
> - dirftype = atoi(value);
> + c = atoi(value);
> + if (c < 0 || c > 1)
> + illegal(value, "n ftype");
> + if (crcs_enabled) {
> + fprintf(stderr,
> +_("cannot specify both crc and ftype\n"));
> + usage();
> + }
> + dirftype = c;
> nftype = 1;
> break;
> default:
>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: XFS hung task in xfs_ail_push_all_sync() when unmounting FS after disk failure/recovery, Shyam Kaushik |
|---|---|
| Next by Date: | Re: XFS hung task in xfs_ail_push_all_sync() when unmounting FS after disk failure/recovery, Carlos Maiolino |
| Previous by Thread: | [PATCH 02/19] mkfs: sanitise ftype parameter values., jtulak |
| Next by Thread: | Re: [PATCH 02/19] mkfs: sanitise ftype parameter values., Jan Tulak |
| Indexes: | [Date] [Thread] [Top] [All Lists] |