On Mon, Aug 27, 2018 at 9:39 AM Dave Taht <dave.t...@gmail.com> wrote: > > On Mon, Aug 27, 2018 at 9:11 AM Stephen Hemminger > <step...@networkplumber.org> wrote: > > > > On Sun, 26 Aug 2018 19:42:28 -0700 > > Yousuk Seung <ysse...@google.com> wrote: > > > > > +int get_time(unsigned int *time, const char *str) > > > +{ > > > + double t; > > > + char *p; > > > + > > > + t = strtod(str, &p); > > > + if (p == str) > > > + return -1; > > > + > > > + if (*p) { > > > + if (strcasecmp(p, "s") == 0 || strcasecmp(p, "sec") == 0 || > > > + strcasecmp(p, "secs") == 0) > > > + t *= TIME_UNITS_PER_SEC; > > > + else if (strcasecmp(p, "ms") == 0 || strcasecmp(p, "msec") > > > == 0 || > > > + strcasecmp(p, "msecs") == 0) > > > + t *= TIME_UNITS_PER_SEC/1000; > > > + else if (strcasecmp(p, "us") == 0 || strcasecmp(p, "usec") > > > == 0 || > > > + strcasecmp(p, "usecs") == 0) > > > + t *= TIME_UNITS_PER_SEC/1000000; > > > + else > > > + return -1; > > > > Do we need to really support UPPER case. > > But that's ALWAYS been the case in the 32 bit version of code above. > Imagine how many former VMS and MVS hackers you'd upset if they had to > turn caps-lock off!
I was trying to be funny, of course. If you want us to rework the patch to also downgrade to being lowercase for both, ok... I'd rather like to finish getting this upstream, there's a change to netem enabling nsec time long stuck behind it. > > > Isn't existing matches semantics good enough? > > But that's the existing case for the 32 bit api, now replicated in the > 64 bit api. ? I think the case-insensitive ship has sailed here. Can't > break userspace. > > Well.. adding UTF-8 would be cool. We could start using the actual > greek symbols for delta (δ) and beta (β) in particular. It would > replace a lot of typing, with a whole bunch more shift keys on a > single letter, fit better into > 80 column lines, and so on, and tc inputs and outputs are already > pretty greek to many. > -- > > Dave Täht > CEO, TekLibre, LLC > http://www.teklibre.com > Tel: 1-669-226-2619 -- Dave Täht CEO, TekLibre, LLC http://www.teklibre.com Tel: 1-669-226-2619