From: Fumitoshi UKAI <ukai@debian.or.jp>
To: linux-hotplug@vger.kernel.org
Subject: input.agent bits parse bug
Date: Sat, 13 Mar 2004 18:11:10 +0000 [thread overview]
Message-ID: <87wu5o7h35.wl@ukai.org> (raw)
Hi,
Recent version of input.agent has some problems parsing modules.inputmap.
From module-init-tools's code, modules.inputmap will have the following
format
name number of unsigned int
evBits 1
keyBits 16
relBits 1
absBits 2
mscBits 1
ledBits 1
sndBits 1
ffBits 4
for each unsigned int value, it is printed by using format string "%lx"
concatinated by ':'
So, keyBits, absBits and ffBits can't be parsed as $(($<n>)) since it
is not simple integer. And other bits parameter should be parsed as
$((0x$<n>)) instead of $(($<n>)) because it is not decimal, but hex value.
I think input.agent should be fixed as follows:
diff -ruN hotplug-2004_03_11.orig/etc/hotplug/input.agent hotplug-2004_03_11/etc/hotplug/input.agent
--- hotplug-2004_03_11.orig/etc/hotplug/input.agent 2004-03-12 08:13:38.000000000 +0900
+++ hotplug-2004_03_11/etc/hotplug/input.agent 2004-03-14 01:56:42.000000000 +0900
@@ -167,16 +167,16 @@
product=$(($5))
version=$(($6))
- evBits=$(($7))
- keyBits=$(($8))
- relBits=$(($9))
+ evBits=$((0x$7))
+ keyBits="$8"
+ relBits=$((0x$9))
shift 9
- absBits=$(($1))
- cbsBits=$(($2))
- ledBits=$(($3))
- sndBits=$(($4))
- ffBits=$(($5))
+ absBits="$1"
+ mscBits=$((0x$2))
+ ledBits="$3"
+ sndBits=$((0x$4))
+ ffBits="$5"
driverInfo=$(($6))
: checkmatch $module
Anyway, I wonder all these bits are parsed as *Bits="$<n>" and use
input_match_bits. Why only ledBits that is only 1 unsigned int value
uses input_match_bits?
Thanks,
Fumitoshi UKAI
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&opÌk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next reply other threads:[~2004-03-13 18:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-13 18:11 Fumitoshi UKAI [this message]
2004-03-26 23:11 ` input.agent bits parse bug Greg KH
2004-03-27 7:40 ` Fumitoshi UKAI
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=87wu5o7h35.wl@ukai.org \
--to=ukai@debian.or.jp \
--cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).