Re: [PATCH 03/12] mkfs: remove intermediate getstr followed by getnum

Eric Sandeen
2017-04-26T13:13:20Z

On 4/26/17 2:40 AM, Jan Tulak wrote:
> On Tue, Apr 25, 2017 at 7:37 PM, Eric Sandeen <sandeen@sandeen.net> wrote:
>> On 4/23/17 1:54 PM, Jan Tulak wrote:

...

>>> + set_conf_raw(opts, index, str);
>> So this is really an unrelated functional change here; ideally, this
>> patch would come before the "raw option" patch. Once every option goes
>> through getnum, /then/ you can add the raw storage to getnum().
>>
>> Not a huge deal, but if you resend the series, you might consider that
>> ordering. Otherwise I think this one looks ok :)
> Well, we are saving the raw here ... and then reading it in printfs.
> So if we want to avoid the situation from the previous set, where
> input error prints changed the values (printing "1024" instead of
> user-given "1k"), we have to use raw before we remove the getstr(),
> not later. But then we might try to print something that didn't go
> through getnum yet, so we don't have the string saved... which is why
> I made it as one patch.

Oh, I see. Ok, thanks - sorry for missing that.

-Eric

> Jan
>