[rwho] Print errors into stderr
Honza Horak
hhorak at fedoraproject.org
Wed Nov 7 07:42:34 UTC 2012
commit 21406cc9aafd5db91c4436e43d02e9c66822bd24
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date: Wed Nov 7 08:39:41 2012 +0100
Print errors into stderr
rwho-0.17-stderr.patch | 24 ++++++++++++++++++++++++
rwho.spec | 7 +++++--
2 files changed, 29 insertions(+), 2 deletions(-)
---
diff --git a/rwho-0.17-stderr.patch b/rwho-0.17-stderr.patch
new file mode 100644
index 0000000..a080172
--- /dev/null
+++ b/rwho-0.17-stderr.patch
@@ -0,0 +1,24 @@
+diff -up netkit-rwho-0.17/ruptime/ruptime.c.stderr netkit-rwho-0.17/ruptime/ruptime.c
+--- netkit-rwho-0.17/ruptime/ruptime.c.stderr 2012-11-07 08:29:27.024731591 +0100
++++ netkit-rwho-0.17/ruptime/ruptime.c 2012-11-07 08:29:52.906741963 +0100
+@@ -186,7 +186,7 @@ main(int argc, char **argv)
+ hsp++;
+ }
+ if (!nhosts) {
+- (void)printf("ruptime: no hosts in %s.\n", _PATH_RWHODIR);
++ (void)fprintf(stderr, "ruptime: no hosts in %s.\n", _PATH_RWHODIR);
+ exit(1);
+ }
+ (void)time(&now);
+diff -up netkit-rwho-0.17/rwho/rwho.c.stderr netkit-rwho-0.17/rwho/rwho.c
+--- netkit-rwho-0.17/rwho/rwho.c.stderr 2012-11-07 08:37:47.539978797 +0100
++++ netkit-rwho-0.17/rwho/rwho.c 2012-11-07 08:33:00.651829733 +0100
+@@ -155,7 +155,7 @@ main(int argc, char *argv[])
+ continue;
+ }
+ if (nusers >= NUSERS) {
+- printf("too many users\n");
++ fprintf(stderr, "too many users\n");
+ exit(1);
+ }
+
diff --git a/rwho.spec b/rwho.spec
index 20c916f..9da8b70 100644
--- a/rwho.spec
+++ b/rwho.spec
@@ -1,7 +1,7 @@
Summary: Displays who is logged in to local network machines
Name: rwho
Version: 0.17
-Release: 46%{?dist}
+Release: 47%{?dist}
# part of rwhod is under GPL+, other parts are under BSD
License: BSD and GPL+
Group: System Environment/Daemons
@@ -19,6 +19,7 @@ Patch8: rwho-0.17-gcc4.patch
Patch9: rwho-0.17-waitchild.patch
Patch10: rwho-0.17-neighbours.patch
Patch11: rwho-0.17-hostnamelen.patch
+Patch12: rwho-0.17-stderr.patch
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
@@ -47,6 +48,7 @@ are logged in to your local network.
%patch9 -p1 -b .waitchild
%patch10 -p1 -b .neighbours
%patch11 -p1 -b .hostnamelen
+%patch12 -p1 -b .stderr
%build
sh configure --with-c-compiler=gcc
@@ -112,8 +114,9 @@ install -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_unitdir}/rwhod.service
%{_unitdir}/*
%changelog
-* Wed Nov 07 2012 Honza Horak <hhorak at redhat.com> - 0.17-46
+* Wed Nov 07 2012 Honza Horak <hhorak at redhat.com> - 0.17-47
- Remove linkage against systemd-daemon
+- Print errors into stderr
* Fri Oct 05 2012 Honza Horak <hhorak at redhat.com> - 0.17-45
- Remove sdnotify message, while it doesn't work with forking service
More information about the scm-commits
mailing list