[xfsprogs] Do we need so many data types for user input?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

as I'm still working on the mkfs changes, there is an opportunity to
clean up data types a bit. Right now, we are saving user input into
long long, bool, uint64, int, uint and string. Custom data types are
not saved into directly but such values are usually a result of a
computation.

I can't find any place (in the user-input section) where would we
really need anything else except uint64 and string. Some examples:

* We load an option into an int and then raise an error if it is a
negative number
* Or we even allow for 0, 1 (and 2) only
* It seems that the only place where we are not limiting the int
values immediately are logarithmic options. But unless my math
knowledge failed me, only complex logarithm is defined for negative
numbers and I really doubt we want to have "3+4.5 i" as blocksize...
;-)

Simply stated, signed values seem to be useless here. And at the end
of the day, we are converting all numbers into unsigned in one part of
the parsing anyway, so I don't see how such a change could change any
behaviour.

So what do you think, can I remove the other types in user-input part
of the code and save all numbers as uint64?

Cheers,
Jan

-- 
Jan Tulak
jtulak@xxxxxxxxxx / jan@xxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux