public inbox for trinity@vger.kernel.org
 help / color / mirror / Atom feed
From: Nico Golde <nico@ngolde.de>
To: trinity@vger.kernel.org
Subject: Re: minor trinity patch
Date: Mon, 24 Jun 2013 18:03:57 +0200	[thread overview]
Message-ID: <20130624160357.GK24423@ngolde.de> (raw)
In-Reply-To: <20130621132046.GS26707@ngolde.de>


[-- Attachment #1.1: Type: text/plain, Size: 458 bytes --]

Hi,
* Nico Golde <nico@ngolde.de> [2013-06-21 15:20]:
> Sorry I had no time to look into this for a while.
> Patch attached.

Attached is another patch on top of the previous one. I didn't see that the 
device name includes the newline so that map_dev() will fail.
This was kind of hard to see unless you have a driver and you know how the 
command ids should look like.

Thanks
Nico
-- 
Nico Golde - XMPP: nion@jabber.ccc.de - GPG: 0xA0A0AAAA

[-- Attachment #1.2: 0001-parse_proc_devices-cut-off-device-string-on-newline.patch --]
[-- Type: text/x-diff, Size: 707 bytes --]

From f850d64ba34c0a0d203912740c00fff03e8f8f3e Mon Sep 17 00:00:00 2001
From: Nico Golde <nion@debian.org>
Date: Mon, 24 Jun 2013 17:56:19 +0200
Subject: [PATCH] parse_proc_devices: cut off device string on newline

---
 devices.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/devices.c b/devices.c
index d3916f9..0166a53 100644
--- a/devices.c
+++ b/devices.c
@@ -38,6 +38,8 @@ static void parse_proc_devices(void)
 		else if (strcmp("Character devices:\n", line) == 0)
 			block = 0;
 		else if (sscanf(line, "%d %*s", &major) == 1) {
+			if ((p = strchr(line, '\n')) != NULL)
+				*p = 0;
 			if ((p = strrchr(line, ' ')) == NULL)
 				continue;
 			p++;
-- 
1.7.10.4


[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2013-06-24 16:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20121220165100.GA8748@ngolde.de>
     [not found] ` <20121220171726.GA7543@redhat.com>
     [not found]   ` <20121220172246.GA16285@ngolde.de>
     [not found]     ` <20121220172741.GA17760@redhat.com>
     [not found]       ` <20121220200255.GB16285@ngolde.de>
     [not found]         ` <20121220201903.GA14944@redhat.com>
2013-05-22 14:14           ` minor trinity patch Nico Golde
2013-05-23 18:58             ` Tommi Rantala
2013-05-23 23:47               ` Nico Golde
2013-06-03  5:55                 ` Tommi Rantala
2013-06-21 13:20                   ` Nico Golde
2013-06-24 16:03                     ` Nico Golde [this message]

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=20130624160357.GK24423@ngolde.de \
    --to=nico@ngolde.de \
    --cc=trinity@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox