* cytune: misnamed long options
@ 2014-04-30 8:52 Benno Schulenberg
2014-04-30 11:25 ` Sami Kerola
0 siblings, 1 reply; 4+ messages in thread
From: Benno Schulenberg @ 2014-04-30 8:52 UTC (permalink / raw)
To: Util-Linux
Hi,
According to the code and the man page of cytune, the option -g
shows the current values of the threshold and the flush timeout,
and option -G shows the default values. But the corresponding
long options of those two are: --get-threshold and --get-flush.
Confusing. Shouldn't those be changed to --get-current and
--get-defaults? (Or the first one maybe just --get?) However,
the docs say not to change any options. What to do? Sami?
Regards,
Benno
--
http://www.fastmail.fm - The professional email service
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cytune: misnamed long options
2014-04-30 8:52 cytune: misnamed long options Benno Schulenberg
@ 2014-04-30 11:25 ` Sami Kerola
2014-05-06 9:26 ` Karel Zak
0 siblings, 1 reply; 4+ messages in thread
From: Sami Kerola @ 2014-04-30 11:25 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: Util-Linux
On 30 April 2014 09:52, Benno Schulenberg <bensberg@justemail.net> wrote:
> According to the code and the man page of cytune, the option -g
> shows the current values of the threshold and the flush timeout,
> and option -G shows the default values. But the corresponding
> long options of those two are: --get-threshold and --get-flush.
> Confusing. Shouldn't those be changed to --get-current and
> --get-defaults? (Or the first one maybe just --get?) However,
> the docs say not to change any options. What to do? Sami?
Hi Benno,
The recommendation never to change options tries to protect a Random J
Developer in breaking existing scripts. If options are deprecated at
least there should be a backwards compatibility with a deprecation
warning for some time (couple years).
Looking the kernel interface
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/cyclades.c#n2639
the 'threshold' keyword seems to be ok. Use of word 'flush' is a bit
odd, and 'timeout' would be closer match with what the kernel is
doing. Karel, are you OK with s/flush/timeout/ ABI change?
After looking sys-utils/cytune.c for a moment I feel the command could
be improved various way. I could aim to do that before v2.25, unless
someone else wants to do more or less similar things what was done
with kill(1).
--
Sami Kerola
http://www.iki.fi/kerolasa/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cytune: misnamed long options
2014-04-30 11:25 ` Sami Kerola
@ 2014-05-06 9:26 ` Karel Zak
2014-05-06 12:06 ` Sami Kerola
0 siblings, 1 reply; 4+ messages in thread
From: Karel Zak @ 2014-05-06 9:26 UTC (permalink / raw)
To: kerolasa; +Cc: Benno Schulenberg, Util-Linux
On Wed, Apr 30, 2014 at 12:25:49PM +0100, Sami Kerola wrote:
> On 30 April 2014 09:52, Benno Schulenberg <bensberg@justemail.net> wrote:
> > According to the code and the man page of cytune, the option -g
> > shows the current values of the threshold and the flush timeout,
> > and option -G shows the default values. But the corresponding
> > long options of those two are: --get-threshold and --get-flush.
> > Confusing. Shouldn't those be changed to --get-current and
> > --get-defaults? (Or the first one maybe just --get?) However,
> > the docs say not to change any options. What to do? Sami?
>
> Hi Benno,
>
> The recommendation never to change options tries to protect a Random J
> Developer in breaking existing scripts. If options are deprecated at
> least there should be a backwards compatibility with a deprecation
> warning for some time (couple years).
>
> Looking the kernel interface
>
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/cyclades.c#n2639
>
> the 'threshold' keyword seems to be ok. Use of word 'flush' is a bit
> odd, and 'timeout' would be closer match with what the kernel is
> doing. Karel, are you OK with s/flush/timeout/ ABI change?
NACK, it seems better to be backwardly compatible than perfect.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cytune: misnamed long options
2014-05-06 9:26 ` Karel Zak
@ 2014-05-06 12:06 ` Sami Kerola
0 siblings, 0 replies; 4+ messages in thread
From: Sami Kerola @ 2014-05-06 12:06 UTC (permalink / raw)
To: Karel Zak; +Cc: Benno Schulenberg, Util-Linux
On 6 May 2014 10:26, Karel Zak <kzak@redhat.com> wrote:
> On Wed, Apr 30, 2014 at 12:25:49PM +0100, Sami Kerola wrote:
>> On 30 April 2014 09:52, Benno Schulenberg <bensberg@justemail.net> wrote:
>> > According to the code and the man page of cytune, the option -g
>> > shows the current values of the threshold and the flush timeout,
>> > and option -G shows the default values. But the corresponding
>> > long options of those two are: --get-threshold and --get-flush.
>> > Confusing. Shouldn't those be changed to --get-current and
>> > --get-defaults? (Or the first one maybe just --get?) However,
>> > the docs say not to change any options. What to do? Sami?
>>
>> Hi Benno,
>>
>> The recommendation never to change options tries to protect a Random J
>> Developer in breaking existing scripts. If options are deprecated at
>> least there should be a backwards compatibility with a deprecation
>> warning for some time (couple years).
>>
>> Looking the kernel interface
>>
>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/cyclades.c#n2639
>>
>> the 'threshold' keyword seems to be ok. Use of word 'flush' is a bit
>> odd, and 'timeout' would be closer match with what the kernel is
>> doing. Karel, are you OK with s/flush/timeout/ ABI change?
>
> NACK, it seems better to be backwardly compatible than perfect.
The NACK seems to indicate the change
https://github.com/kerolasa/lelux-utiliteetit/commit/2453ab9f64de49bb5a1b9a0bcd3653cd761a22b2
should not warnx(), nor be marked deprecated. Or to say other way, the
old long options should be silently accepted until end of universe.
Let me fix that (later the day when I'm not in office).
--
Sami Kerola
http://www.iki.fi/kerolasa/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-06 12:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30 8:52 cytune: misnamed long options Benno Schulenberg
2014-04-30 11:25 ` Sami Kerola
2014-05-06 9:26 ` Karel Zak
2014-05-06 12:06 ` Sami Kerola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox