[rwho] add -n option to ruptime manpage

Jan Horak hhorak at fedoraproject.org
Wed Dec 7 14:38:37 UTC 2011


commit 55aa05e21462081166f2f1b77dbf283c9bdab8ac
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date:   Wed Dec 7 15:38:13 2011 +0100

    add -n option to ruptime manpage

 netkit-rwho-0.17-hostnamelen.patch |   36 ++++++++++++++++++++++++++++--------
 rwho.spec                          |    1 +
 2 files changed, 29 insertions(+), 8 deletions(-)
---
diff --git a/netkit-rwho-0.17-hostnamelen.patch b/netkit-rwho-0.17-hostnamelen.patch
index 8710a1e..3dc2274 100644
--- a/netkit-rwho-0.17-hostnamelen.patch
+++ b/netkit-rwho-0.17-hostnamelen.patch
@@ -1,8 +1,26 @@
-Only in netkit-rwho-0.17mzk/: MCONFIG
-Only in netkit-rwho-0.17mzk/ruptime: a.out
-diff -urp netkit-rwho-0.17/ruptime/ruptime.c netkit-rwho-0.17mzk/ruptime/ruptime.c
---- netkit-rwho-0.17/ruptime/ruptime.c	2007-08-10 13:29:10.000000000 +0200
-+++ netkit-rwho-0.17mzk/ruptime/ruptime.c	2007-08-10 13:46:08.000000000 +0200
+diff -up netkit-rwho-0.17/ruptime/ruptime.1.hostnamelen netkit-rwho-0.17/ruptime/ruptime.1
+--- netkit-rwho-0.17/ruptime/ruptime.1.hostnamelen	2000-07-31 01:57:06.000000000 +0200
++++ netkit-rwho-0.17/ruptime/ruptime.1	2011-12-07 15:35:33.952091668 +0100
+@@ -41,6 +41,7 @@
+ .Sh SYNOPSIS
+ .Nm ruptime
+ .Op Fl alrtu
++.Op Fl n Ar length
+ .Sh DESCRIPTION
+ .Nm Ruptime
+ gives a status line like
+@@ -65,6 +66,8 @@ Reverses the sort order.
+ Sort by uptime.
+ .It Fl u
+ Sort by number of users.
++.It Fl n
++Specify hostname length in output.
+ .El
+ .Pp
+ The default listing is sorted by host name.
+diff -up netkit-rwho-0.17/ruptime/ruptime.c.hostnamelen netkit-rwho-0.17/ruptime/ruptime.c
+--- netkit-rwho-0.17/ruptime/ruptime.c.hostnamelen	2011-12-07 15:32:31.076104173 +0100
++++ netkit-rwho-0.17/ruptime/ruptime.c	2011-12-07 15:32:31.157104168 +0100
 @@ -66,6 +66,7 @@ struct hs {
  
  #define	ISDOWN(h)	(now - (h)->hs_recvtime > 11 * 60)
@@ -24,7 +42,7 @@ diff -urp netkit-rwho-0.17/ruptime/ruptime.c netkit-rwho-0.17mzk/ruptime/ruptime
  		switch((char)ch) {
  		case 'a':
  			aflg = 1;
-@@ -113,6 +115,13 @@ main(int argc, char **argv)
+@@ -113,8 +115,15 @@ main(int argc, char **argv)
  		case 'u':
  			cmp = ucmp;
  			break;
@@ -36,8 +54,11 @@ diff -urp netkit-rwho-0.17/ruptime/ruptime.c netkit-rwho-0.17mzk/ruptime/ruptime
 +			}
 +			break;
  		default: 
- 			(void)fprintf(stderr, "usage: ruptime [-alrut]\n");
+-			(void)fprintf(stderr, "usage: ruptime [-alrut]\n");
++			(void)fprintf(stderr, "usage: ruptime [-alrutn]\n");
  			exit(1);
+ 		}
+ 
 @@ -182,15 +191,20 @@ main(int argc, char **argv)
  	}
  	(void)time(&now);
@@ -61,4 +82,3 @@ diff -urp netkit-rwho-0.17/ruptime/ruptime.c netkit-rwho-0.17mzk/ruptime/ruptime
  		    hsp->hs_hostname,
  		    interval((time_t)hsp->hs_sendtime -
  			(time_t)hsp->hs_boottime, "  up"),
-Only in netkit-rwho-0.17mzk/ruptime: ruptime.c~
diff --git a/rwho.spec b/rwho.spec
index 5b6b226..76df89d 100644
--- a/rwho.spec
+++ b/rwho.spec
@@ -130,6 +130,7 @@ fi
 - systemd unit file mod fix
   removed non-essential Requires: /sbin/chkconfig /etc/init.d
 - allow longer hostnames (bug #212076)
+- add -n option to ruptime manpage
 
 * Wed Aug 01 2011 Honza Horak <hhorak at redhat.com> - 0.17-36
 - added systemd native unit file


More information about the scm-commits mailing list