Re: [PATCH 0/6] pull: renice changes

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

 



On Sat, 6 Sep 2014, Sami Kerola wrote:

The renice(1) code looked a bit dated, so I decided to change it a bit
which resulted few more changes than I thought.  The --priority <arg>
change makes the command line interface a bit less awkward, and the
numeric uid argument parsing is a bug fix.  Rest of the changes are clean
ups.

Pull request I sent earlier is no longer completely up to date. The renice branch is rebased on top of upstream master, and there is one new change 0007: reorder usage() option descriptions.


The following changes since commit a3b92242ad76a7468cf508e1d878d0815c7e031f:

  libmount: hide details about failed search in fstab/mtab (2014-09-16 15:30:03 +0200)

are available in the git repository at:

  git://github.com/kerolasa/lelux-utiliteetit.git renice

for you to fetch changes up to a32b3f68da162eadbb17ff65a585d0249805c32f:

  renice: reorder usage() option descriptions (2014-09-16 21:09:11 +0100)

----------------------------------------------------------------
Sami Kerola (7):
      renice: reorder functions to avoid need of function prototype
      rename: use usage and version print out macros
      renice: disallow --priority <arg> without pid argument
      renice: avoid having same lines of code twice
      renice: fix numeric uid argument parsing
      rename: add getpriority() message lookup table
      renice: reorder usage() option descriptions

sys-utils/renice.c | 111 ++++++++++++++++++++++++++---------------------------
 1 file changed, 55 insertions(+), 56 deletions(-)

-->8---
From: Sami Kerola <kerolasa@xxxxxx>
Date: Sun, 14 Sep 2014 11:12:58 +0100
Subject: [PATCH 7/7] renice: reorder usage() option descriptions

Make the Usage: and Options: sections to be in same order, which I found
to be quicker to use than alphabetical order.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 sys-utils/renice.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sys-utils/renice.c b/sys-utils/renice.c
index 994c9de..100f6a5 100644
--- a/sys-utils/renice.c
+++ b/sys-utils/renice.c
@@ -63,12 +63,13 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
 		" %1$s [-n] <priority>  -u|--user <user>...\n"),
 		program_invocation_short_name);
 	fputs(USAGE_OPTIONS, out);
-	fputs(_(" -g, --pgrp <id>        interpret argument as process group ID\n"
-		" -n, --priority <num>   specify the nice increment value\n"
-		" -p, --pid <id>         interpret argument as process ID (default)\n"
-		" -u, --user <name|id>   interpret argument as username or user ID\n"
-		" -h, --help             display help text and exit\n"
-		" -V, --version          display version information and exit\n"), out);
+	fputs(_(" -n, --priority <num>   specify the nice increment value\n"), out);
+	fputs(_(" -p, --pid <id>         interpret argument as process ID (default)\n"), out);
+	fputs(_(" -g, --pgrp <id>        interpret argument as process group ID\n"), out);
+	fputs(_(" -u, --user <name|id>   interpret argument as username or user ID\n"), out);
+	fputs(USAGE_SEPARATOR, out);
+	fputs(USAGE_HELP, out);
+	fputs(USAGE_VERSION, out);
 	fprintf(out, USAGE_MAN_TAIL("renice(1)"));
 	exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
 }
--
2.1.0

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