Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/dmesg Use the locale's numeric radix character ("decima...
details: https://anonhg.NetBSD.org/src/rev/14d780ab4dd2
branches: trunk
changeset: 433561:14d780ab4dd2
user: kre <kre%NetBSD.org@localhost>
date: Thu Sep 20 19:50:42 2018 +0000
description:
Use the locale's numeric radix character ("decimal point") more generally
(in !SMALL versions of dmesg).
diffstat:
sbin/dmesg/dmesg.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r ef314a4ebbc6 -r 14d780ab4dd2 sbin/dmesg/dmesg.c
--- a/sbin/dmesg/dmesg.c Thu Sep 20 19:02:22 2018 +0000
+++ b/sbin/dmesg/dmesg.c Thu Sep 20 19:50:42 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dmesg.c,v 1.38 2018/09/20 06:06:06 kre Exp $ */
+/* $NetBSD: dmesg.c,v 1.39 2018/09/20 19:50:42 kre Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dmesg.c 8.1 (Berkeley) 6/5/93";
#else
-__RCSID("$NetBSD: dmesg.c,v 1.38 2018/09/20 06:06:06 kre Exp $");
+__RCSID("$NetBSD: dmesg.c,v 1.39 2018/09/20 19:50:42 kre Exp $");
#endif
#endif /* not lint */
@@ -350,7 +350,7 @@
printf("%s", fp);
}
} else if (!quiet) {
- printf(" %5jd.", sec);
+ printf(" %5jd%s", sec, radix);
pnsec(nsec, fsec, scale);
}
if (deltas) {
@@ -360,8 +360,9 @@
timespecsub(&nt, &lasttime, &dt);
if (humantime || !quiet)
printf(" ");
- printf("<% 4jd.%06ld>", (intmax_t)
- dt.tv_sec, (dt.tv_nsec+499) / 1000);
+ printf("<% 4jd%s%6.6ld>",
+ (intmax_t)dt.tv_sec, radix,
+ (dt.tv_nsec+499) / 1000);
lasttime = nt;
}
if (!quiet || deltas)
Home |
Main Index |
Thread Index |
Old Index