xfs
[Top] [All Lists]

Re: [PATCH 07/15] mkfs: structify input parameter passing

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 07/15] mkfs: structify input parameter passing
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 3 Dec 2013 10:16:48 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131202171103.GC14935@xxxxxxxxxxxxx>
References: <1385689430-10103-1-git-send-email-david@xxxxxxxxxxxxx> <1385689430-10103-8-git-send-email-david@xxxxxxxxxxxxx> <20131202171103.GC14935@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Dec 02, 2013 at 09:11:03AM -0800, Christoph Hellwig wrote:
> > +   const char      name;
> > +   const char      *subopts[MAX_SUBOPTS];
> > +   struct subopt_param {
> > +           int             index;
> > +           long long       minval;
> > +           long long       maxval;
> > +   }               subopt_params[MAX_SUBOPTS];
> > +};
> 
> Any reason to have a separate array for subopts instead of
> moving it into struct subopt_param?

getsubopt() requires a array of tokens for it's parsing, hence the
separation of the subopts names and the related parameters.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>