All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: kerolasa@gmail.com
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [git pull] schedutils
Date: Tue, 19 Jul 2011 00:17:51 +0200	[thread overview]
Message-ID: <20110718221751.GD4354@nb.redhat.com> (raw)
In-Reply-To: <CAG27Bk0XXawQERH19+iUguDame2Pts_+bvrt8Of0+ib9KSW3NA@mail.gmail.com>

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() ?

> +	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.

>  .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.

>  	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...

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

 "%s from %s" ;-)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2011-07-18 22:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-17 18:37 [git pull] schedutils Sami Kerola
2011-07-18 22:17 ` Karel Zak [this message]
2011-07-20  8:15   ` Sami Kerola
2011-07-21 15:43     ` Karel Zak
2011-07-21 18:37       ` Sami Kerola
2011-07-21 19:03         ` Karel Zak
2011-07-21 20:03           ` Sami Kerola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110718221751.GD4354@nb.redhat.com \
    --to=kzak@redhat.com \
    --cc=kerolasa@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.