Re: [PATCH] wall: add usage function

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

 



On Mon, 2011-01-17 at 16:47 +0100, Karel Zak wrote:
> On Thu, Jan 06, 2011 at 09:08:43AM -0300, Davidlohr Bueso wrote:
> > From: Davidlohr Bueso <dave@xxxxxxx>
> > 
> > Instead of using an ugly goto statement, we can add a proper usage function.
> > This also adds the undocumented '-n' option to the output string.
> > 
> > Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
> > ---
> >  login-utils/wall.c |   13 ++++++++-----
> >  1 files changed, 8 insertions(+), 5 deletions(-)
> 
>  Applied, thanks.
> 

Thanks. We could also use this patch.

From: Davidlohr Bueso <dave@xxxxxxx>
Subject: [PATCH] wall: document -n option

Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
---
 login-utils/wall.1 |    3 +++
 login-utils/wall.c |    1 -
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/login-utils/wall.1 b/login-utils/wall.1
index 1f85c40..6a511d5 100644
--- a/login-utils/wall.1
+++ b/login-utils/wall.1
@@ -41,6 +41,7 @@
 .Nd write a message to users
 .Sh SYNOPSIS
 .Nm wall
+.Op Ar -n
 .Op Ar file
 .Sh DESCRIPTION
 .Nm Wall
@@ -56,6 +57,8 @@ automatically denies messages.
 .Pp
 Reading from a file is refused when the invoker is not superuser
 and the program is suid or sgid.
+.Sh OPTIONS
+ -n Supress banner
 .Sh SEE ALSO
 .Xr mesg 1 ,
 .Xr talk 1 ,
diff --git a/login-utils/wall.c b/login-utils/wall.c
index 2ecce12..0385480 100644
--- a/login-utils/wall.c
+++ b/login-utils/wall.c
@@ -98,7 +98,6 @@ main(int argc, char **argv) {
 	while ((ch = getopt(argc, argv, "n")) != -1) {
 		switch (ch) {
 		case 'n':
-			/* undoc option for shutdown: suppress banner */
 			if (geteuid() == 0)
 				nobanner = 1;
 			break;
-- 
1.7.1

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