Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/sysctl Fix minor annoyance - when showing the boottime, ...
details: https://anonhg.NetBSD.org/src/rev/764e40934f64
branches: trunk
changeset: 485161:764e40934f64
user: simonb <simonb%NetBSD.org@localhost>
date: Fri Apr 21 02:49:37 2000 +0000
description:
Fix minor annoyance - when showing the boottime, the ctime() result
already has a trailing newline, so don't add an extra one.
diffstat:
sbin/sysctl/sysctl.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 3126dd2ac7ae -r 764e40934f64 sbin/sysctl/sysctl.c
--- a/sbin/sysctl/sysctl.c Fri Apr 21 02:45:01 2000 +0000
+++ b/sbin/sysctl/sysctl.c Fri Apr 21 02:49:37 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysctl.c,v 1.30 2000/04/14 06:03:40 simonb Exp $ */
+/* $NetBSD: sysctl.c,v 1.31 2000/04/21 02:49:37 simonb Exp $ */
/*
* Copyright (c) 1993
@@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: sysctl.c,v 1.30 2000/04/14 06:03:40 simonb Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.31 2000/04/21 02:49:37 simonb Exp $");
#endif
#endif /* not lint */
@@ -556,7 +556,8 @@
if (!nflag) {
boottime = btp->tv_sec;
- fprintf(stdout, "%s = %s\n", string, ctime(&boottime));
+ /* ctime() provides the trailing newline */
+ fprintf(stdout, "%s = %s", string, ctime(&boottime));
} else
fprintf(stdout, "%ld\n", (long) btp->tv_sec);
return;
Home |
Main Index |
Thread Index |
Old Index