rpms/finger/devel bsd-finger-0.17-host-info.patch, NONE, 1.1 finger.spec, 1.32, 1.33

Petr Lautrbach plautrba at fedoraproject.org
Tue Jul 13 15:34:03 UTC 2010


Author: plautrba

Update of /cvs/pkgs/rpms/finger/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv27781

Modified Files:
	finger.spec 
Added Files:
	bsd-finger-0.17-host-info.patch 
Log Message:
print user host information in better format  (#532414)


bsd-finger-0.17-host-info.patch:
 sprint.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

--- NEW FILE bsd-finger-0.17-host-info.patch ---
--- bsd-finger-0.17/finger/sprint.c	2009-11-02 13:11:20.000000000 +0530
+++ bsd-finger-0.17/finger/sprint.c.add-host-column	2009-11-02 13:10:43.000000000 +0530
@@ -89,7 +89,7 @@ void sflag_print(void) {
 	if (maxlname + maxrname < space-2) { maxlname++; maxrname++; }
 
 	(void)xprintf("%-*s %-*s %s\n", maxlname, "Login", maxrname,
-	    "Name", " Tty      Idle  Login Time   Office     Office Phone");
+	    "Name", " Tty      Idle  Login Time   Office     Office Phone   Host");
 	for (cnt = 0; cnt < entries; ++cnt) {
 		pn = list[cnt];
 		for (w = pn->whead; w != NULL; w = w->next) {
@@ -118,17 +118,18 @@ void sflag_print(void) {
 			else
 				(void)xprintf(" %.5s", p + 11);
 office:
-			if (w->host[0] != '\0') {
-				xprintf(" (%s)", w->host);
-			} else {
 			if (pn->office)
 				(void)xprintf(" %-10.10s", pn->office);
-			else if (pn->officephone)
+			else
 				(void)xprintf(" %-10.10s", " ");
 			if (pn->officephone)
-				(void)xprintf(" %-.14s",
+				(void)xprintf(" %-14.14s",
 				    prphone(pn->officephone));
-			}
+			else if (w->host[0] != '\0')
+				(void)xprintf(" %-14.14s", " ");
+
+			if (w->host[0] != '\0')
+				xprintf(" (%s)", w->host);
 			xputc('\n');
 		}
 	}


Index: finger.spec
===================================================================
RCS file: /cvs/pkgs/rpms/finger/devel/finger.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -p -r1.32 -r1.33
--- finger.spec	12 Jul 2010 10:57:03 -0000	1.32
+++ finger.spec	13 Jul 2010 15:34:03 -0000	1.33
@@ -1,7 +1,7 @@
 Summary: The finger client
 Name: finger
 Version: 0.17
-Release: 41%{?dist}
+Release: 42%{?dist}
 License: BSD
 Group: Applications/Internet
 Source: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/bsd-finger-%{version}.tar.gz
@@ -19,6 +19,7 @@ Patch8: bsd-finger-0.17-strip.patch
 Patch9: bsd-finger-0.17-utmp.patch
 Patch10: bsd-finger-wide-char-support5.patch
 Patch11: bsd-finger-0.17-init-realname.patch
+Patch12: bsd-finger-0.17-host-info.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: glibc-devel
 
@@ -59,6 +60,7 @@ and you'd like finger information to be 
 %patch9 -p1 -b .utmp
 %patch10 -p1 -b .widechar
 %patch11 -p1 
+%patch12 -p1 -b .host
 
 install -m 644 %SOURCE2 COPYING
 
@@ -104,6 +106,9 @@ rm -rf ${RPM_BUILD_ROOT}
 %doc COPYING
 
 %changelog
+* Tue Jul 13 2010 Petr Lautrbach <plautrba at redhat.com> 0.17-42
+- print user host information in better format  (#532414) - <spoyarek at redhat.com>
+
 * Mon Jul 12 2010 Petr Lautrbach <plautrba at redhat.com> 0.17-41
 - fix UTF-8 output in list of logged users (#490443)
 



More information about the scm-commits mailing list