Hi, * Nico Golde <nico@xxxxxxxxx> [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@xxxxxxxxxxxxx - GPG: 0xA0A0AAAA
From f850d64ba34c0a0d203912740c00fff03e8f8f3e Mon Sep 17 00:00:00 2001 From: Nico Golde <nion@xxxxxxxxxx> 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:
pgpr8UUaL0Z_W.pgp
Description: PGP signature