NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/56797
The following reply was made to PR kern/56797; it has been noted by GNATS.
From: Vighnesh sawant <vighneshsawant366%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/56797
Date: Sun, 15 Feb 2026 19:26:27 +0530
Hey, can you checkout this patch, i am on 11.0_RC_1 though.
Its my first patch and I cant really get edit-pr to work yet.
This introduces two different bools, to take care of timestamp for log
and console.
--- src/sys/kern/subr_prf.c 2026-02-15 17:39:48.356785330 +0530
+++ src1/sys/kern/subr_prf.c 2026-02-15 18:39:39.550490911 +0530
@@ -446,8 +446,7 @@
}
#ifndef KLOG_NOTIMESTAMP
-static int log_needtstamp = 1;
-static int cons_needtstamp = 1;
+static int needtstamp = 1;
int log_ts_prec = 7;
static void
@@ -498,28 +497,13 @@
}
#ifndef KLOG_NOTIMESTAMP
- if (c != '\0' && c != '\n' && (flags & NOTSTAMP) == 0) {
- int tsflags = 0;
-
- if ((flags & TOLOG) && log_needtstamp) {
- tsflags |= TOLOG;
- log_needtstamp = 0;
- }
- if ((flags & TOCONS) && cons_needtstamp) {
- tsflags |= TOCONS;
- cons_needtstamp = 0;
- }
- if (tsflags != 0)
- addtstamp(tsflags, tp);
- }
-
- if (c == '\n') {
- if (flags & TOLOG)
- log_needtstamp = 1;
- if (flags & TOCONS)
- cons_needtstamp = 1;
- }
+ if (c != '\0' && c != '\n' && needtstamp && (flags & NOTSTAMP) == 0) {
+ addtstamp(flags, tp);
+ needtstamp = 0;
+ }
+ if (c == '\n')
+ needtstamp = 1;
#endif
putone(c, flags, tp);
Home |
Main Index |
Thread Index |
Old Index