Skip to contentSkip to conversation

small textual fixes and comment tweaks

PATCH Applied Benno Schulenberg 2 participants 2 messages May 29, 2013 – Jun 7, 2013 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 small textual fixes and comment tweaks

Hi,

The first patch standardizes the usage message of 'login' to the use of angular brackets, the second standardizes the spelling of "super-user" to the more common "superuser", the third makes a minor tweak, and in the fourth patch I got carried away and reviewed all the comments in login.c -- if this is too much, I can redo the patch to contain just the grammar and typo fixes ("accout", "reinilizalize", ...).

Regards,

Benno

Signature · 2 lines
http://www.fastmail.fm - Accessible with your email software
                          or over the web

From d2f1a68d4e26b1cb341960e6f444bbb6f2709888 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Wed, 29 May 2013 19:46:23 +0200
Subject: [PATCH 1/4] textual: standardize synopsis for login, and improve an error message

---
 login-utils/login.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
login-utils/login.c +2 -2
index 442ad40..37dc9d0 100644
@@ -1277,7 +1277,7 @@ int main(int argc, char **argv)
 		case 'h':
 			if (getuid()) {
 				fprintf(stderr,
-					_("login: -h for super-user only.\n"));
+					_("login: -h is for superuser only\n"));
 				exit(EXIT_FAILURE);
 			}
 			init_remote_info(&cxt, optarg);
@@ -1292,7 +1292,7 @@ int main(int argc, char **argv)
 			return EXIT_SUCCESS;
 		case '?':
 		default:
-			fprintf(stderr, _("usage: login [ -p ] [ -h host ] [ -H ] [ -f username | username ]\n"));
+			fprintf(stderr, _("Usage: login [-p] [-h <host>] [-H] [[-f] <username>]\n"));
 			exit(EXIT_FAILURE);
 		}
 	argc -= optind;
Signature · 1 line
1.7.0.4

From c34b5ba9fa6ca16a99fcd46926dbf9095e163d6e Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Wed, 29 May 2013 19:47:48 +0200
Subject: [PATCH 2/4] textual: standardize the spelling of "superuser"

---
 login-utils/su-common.c |    2 +-
 sys-utils/renice.1      |    6 +++---
 term-utils/wall.1       |    2 +-
 term-utils/write.1      |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
login-utils/su-common.c +1 -1
index a41d015..ee34053 100644
@@ -499,7 +499,7 @@ modify_environment (const struct passwd *pw, const char *shell)
     }
   else
     {
-      /* Set HOME, SHELL, and if not becoming a super-user,
+      /* Set HOME, SHELL, and (if not becoming a superuser)
 	 USER and LOGNAME.  */
       if (change_environment)
         {
sys-utils/renice.1 +3 -3
index 705138c..f90ebe2 100644
@@ -83,12 +83,12 @@ PIDs 987 and 32, plus all processes owned by the users daemon and root:
 .TP
 .B "       renice" +1 987 -u daemon root -p 32
 .SH NOTES
-Users other than the super-user may only alter the priority of processes they
+Users other than the superuser may only alter the priority of processes they
 own, and can only monotonically increase their ``nice value'' (for security
 reasons) within the range 0 to
 .BR PRIO_MAX \ (20),
 unless a nice resource limit is set (Linux 2.6.12 and higher).  The
-super-user may alter the priority of any process and set the priority to any
+superuser may alter the priority of any process and set the priority to any
 value in the range
 .BR PRIO_MIN \ (\-20)
 to
@@ -104,7 +104,7 @@ to map user names to user IDs
 .BR getpriority (2),
 .BR setpriority (2)
 .SH BUGS
-Non super-users can not increase scheduling priorities of their own processes,
+Non-superusers cannot increase scheduling priorities of their own processes,
 even if they were the ones that decreased the priorities in the first place.
 .PP
 The Linux kernel (at least version 2.0.0) and linux libc (at least version
term-utils/wall.1 +1 -1
index 88e816c..4d2a9f7 100644
@@ -48,7 +48,7 @@ in users.  The command will cut over 79 character long lines to new lines.
 Short lines are white space padded to have 79 characters.  The command will
 always put carriage return and new line at the end of each line.
 .PP
-Only the super-user can write on the terminals of users who have chosen to
+Only the superuser can write on the terminals of users who have chosen to
 deny messages or are using a program which automatically denies messages.
 .PP
 Reading from a file is refused when the invoker is not superuser and the
term-utils/write.1 +1 -1
index b606575..33eb914 100644
@@ -66,7 +66,7 @@ user will see the message
 .B EOF
 indicating that the conversation is over.
 .PP
-You can prevent people (other than the super-user) from writing to you with
+You can prevent people (other than the superuser) from writing to you with
 the
 .BR mesg (1)
 command.  Some commands, for example
Signature · 1 line
1.7.0.4

From daedff992d16c39a0d657db109dc963ddc0c4eb2 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Wed, 29 May 2013 19:53:38 +0200
Subject: [PATCH 3/4] textual: tiny alphabetical and grammatical tweak

---
 login-utils/su-common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
login-utils/su-common.c +1 -1
index ee34053..8b08df1 100644
@@ -632,7 +632,7 @@ usage (int status)
     fputs (_("\n"
     "Run <command> with the effective user ID and group ID of <user>.  If -u is\n"
     "not given, fall back to su(1)-compatible semantics and execute standard shell.\n"
-    "The options -l, -c, -f, -s are mutually exclusive to -u.\n"), stdout);
+    "The options -c, -f, -l, and -s are mutually exclusive with -u.\n"), stdout);
 
     fputs(USAGE_OPTIONS, stdout);
 
Signature · 1 line
1.7.0.4

From 436d77eda9c14f10300c5bba176fa60125ac0ba7 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Wed, 29 May 2013 20:09:20 +0200
Subject: [PATCH 4/4] docs: improve grammar and consistency of comments in login.c

---
 login-utils/login.c |  162 ++++++++++++++++++++++++---------------------------
 1 files changed, 77 insertions(+), 85 deletions(-)
login-utils/login.c +77 -85

422 lines not on this page · raw message

Signature · 1 line
1.7.0.4
maintainer Applied
#1 lore raw
Quoted 1 line · Benno Schulenberg

The first patch standardizes the usage message of 'login' to the use of

It would be nice to have a real usage() function in login.c.

Quoted 5 lines

angular brackets, the second standardizes the spelling of "super-user" to the more common "superuser", the third makes a minor tweak, and in the fourth patch I got carried away and reviewed all the comments in login.c -- if this is too much, I can redo the patch to contain just the grammar and typo fixes ("accout", "reinilizalize", ...).

It's OK to fix stupid typos and grammar mistakes in comments, but it's probably overkill to clean up all comments in all utils.

It's usually better to do such massive changes together with code cleanup (or after code cleanup). We recently did code refactoring in login, eject, mount, umount, sulogin, cal, whereis, dmesg, etc.

The new code is also in lsblk, findmnt, lscpu, lslocks, prlimit, ...

But for now don't waste time with things like fdisk, hexdump, hwclock, etc.

Applied, thanks.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com