From: Karel Zak <kzak@redhat.com>
To: "Gabor Z. Papp" <gzp@papp.hu>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: dmesg(1) bug
Date: Fri, 2 Sep 2011 15:09:31 +0200 [thread overview]
Message-ID: <20110902130931.GA4117@nb.redhat.com> (raw)
In-Reply-To: <x6zkiopqua@gzp>
On Thu, Sep 01, 2011 at 11:14:05AM +0200, Gabor Z. Papp wrote:
> After patching dmesg, there is still difference between the old 2.19.x
> and the new 2.20 output.
> - Intel GenuineIntel
> + Intel GenuineIntel
This is small bug, kernel uses extra space after [...] time stamp.
The new dmesg(1) removes this space at the begin of the message, but
always and everywhere. The patch below fixes this issue
(unfortunately, kernel.org is still down, so I can't push it..).
> -generic-usb 0003:045E:001E.0001: input: USB HID v1.00 Mouse [Microsoft Microsoft IntelliMouse® Explorer] on usb-0000:00:1d.0-1/input0
> +input: Microsoft Microsoft IntelliMouse\xffffffc2\xffffffae Explorer as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1:1.0/input/input1
Do you have enabled widechar support? (See HAVE_WIDECHAR in config.h).
The new dmesg(1) does not blindly print all unprintable chars
(iswprint(), isprint()).
Karel
>From 31c9099a81d3a9c70fdceb198eebed678173d954 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Fri, 2 Sep 2011 14:42:04 +0200
Subject: [PATCH] dmesg: remove extra space only after time stamp
Signed-off-by: Karel Zak <kzak@redhat.com>
---
sys-utils/dmesg.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index 8e7bb4b..b3713a0 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -480,11 +480,10 @@ static int get_next_record(struct dmesg_control *ctl, struct dmesg_record *rec)
break;
}
}
+ if (begin < end && *begin == ' ')
+ begin++;
}
- if (begin < end && *begin == ' ')
- begin++;
-
rec->mesg = begin;
rec->mesg_size = end - begin;
--
1.7.6
next prev parent reply other threads:[~2011-09-02 13:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 10:48 dmesg(1) bug Karel Zak
2011-09-01 9:14 ` Gabor Z. Papp
2011-09-02 13:09 ` Karel Zak [this message]
2011-09-03 10:00 ` Gabor Z. Papp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110902130931.GA4117@nb.redhat.com \
--to=kzak@redhat.com \
--cc=gzp@papp.hu \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.