Re: [git pull] schedutils

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

 



On Tue, Jul 19, 2011 at 00:17, Karel Zak <kzak@xxxxxxxxxx> wrote:
> On Sun, Jul 17, 2011 at 08:37:58PM +0200, Sami Kerola wrote:
>>       default:
>> -             printf(_("unknown\n"));
>> +             printf(_("unknown scheduling policy\n"));
>
>  what about warnx() ?

You are right. Change is done.

>> +     printf(_("policy          : min/max priority\n"
>> +              "----------------+-----------------\n"));
>
>  oh...
>
>>       for (i = 0; i < ARRAY_SIZE(policies); i++) {
>>               int max = sched_get_priority_max(policies[i]);
>>               int min = sched_get_priority_min(policies[i]);
>>
>>               if (max >= 0 && min >= 0)
>> -                     printf(_("SCHED_%s min/max priority\t: %d/%d\n"),
>> +                     printf(_("SCHED_%-10s: %d/%d\n"),
>>                                       names[i], min, max);
>
>  ...this is not backwardly compatible.
>
>  If you really want to have nice output then use include/tt.c (see for
>  example partx, findmnt or lsblk) and add a new option for such
>  functionality.

This change is dropped for now.

>>  .SH SYNOPSIS
>>  .B ionice
>> -.RB [[ \-c
>> -.IR class ]
>> -.RB [ \-n
>> -.IR classdata ]
>> -.RB [ \-t ]]
>> -.BI \-p \ PID
>> -.RI [ PID  ]...
>> +[OPTION] \fB\-p\fR PID [PID...]
>>  .br
>>  .B ionice
>> -.RB [ \-c
>> -.IR class ]
>> -.RB [ \-n
>> -.IR classdata ]
>> -.RB [ \-t ]
>> -.IR COMMAND\  [ ARG  ]...
>> +[OPTION] COMMAND
>
> hmm.. don't forget that people love examples, IMHO the old version
> seems more readable.

I put the longer synopsis back in place.

>>       textdomain(PACKAGE);
>>
>> -     while ((c = getopt(argc, argv, "+n:c:p:th")) != EOF) {
>> +     while ((c = getopt_long(argc, argv, "+n:c:p:tVh", longopts, NULL)) != EOF)
>>               switch (c) {
>>               case 'n':
>> -                     ioprio = strtol_or_err(optarg, _("failed to parse class data"));
>> +                     ioprio = strtol_or_err(optarg, _("failed to parse priority"));
>
> well, the original kernel Documentation/block/ioprio.txt is talking
> about "class data" and I think it would be better to follow kernel
> here. Maybe one day the mask for the syscall will used for a different
> things than only for priority...

I read kernel documentation using priority, class data and level as
synonyms. To me the `class data' is most confusing because it gets
mixed up with `class'. As you did not like `priority' I do my last
attempt to change the word and used `level'. How that would sound?
IMHO it is a clarity enhancement, which should lead to greater
usability (that admittedly very difficult to measure).

>> +             case 'V':
>> +                     printf(_("%s (%s)\n"),
>
>  "%s from %s" ;-)

Chanced to all of these three utilities.

The fixes are available in the git repository at:
 https://github.com/kerolasa/lelux-utiliteetit schedutils

-- 
   Sami Kerola
   http://www.iki.fi/kerolasa/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux