From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fumitoshi UKAI Date: Sat, 13 Mar 2004 18:11:10 +0000 Subject: input.agent bits parse bug Message-Id: <87wu5o7h35.wl@ukai.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org 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 $(($)) since it is not simple integer. And other bits parameter should be parsed as $((0x$)) instead of $(($)) because it is not decimal, but hex value. I think input.agent should be fixed as follows: =20 diff -ruN hotplug-2004_03_11.orig/etc/hotplug/input.agent hotplug-2004_03_1= 1/etc/hotplug/input.agent --- hotplug-2004_03_11.orig/etc/hotplug/input.agent 2004-03-12 08:13:38.000= 000000 +0900 +++ hotplug-2004_03_11/etc/hotplug/input.agent 2004-03-14 01:56:42.00000000= 0 +0900 @@ -167,16 +167,16 @@ product=3D$(($5)) version=3D$(($6)) =20 - evBits=3D$(($7)) - keyBits=3D$(($8)) - relBits=3D$(($9)) + evBits=3D$((0x$7)) + keyBits=3D"$8" + relBits=3D$((0x$9)) =20 shift 9 - absBits=3D$(($1)) - cbsBits=3D$(($2)) - ledBits=3D$(($3)) - sndBits=3D$(($4)) - ffBits=3D$(($5)) + absBits=3D"$1" + mscBits=3D$((0x$2)) + ledBits=3D"$3" + sndBits=3D$((0x$4)) + ffBits=3D"$5" driverInfo=3D$(($6)) =20 : checkmatch $module Anyway, I wonder all these bits are parsed as *Bits=3D"$" and use input_match_bits. Why only ledBits that is only 1 unsigned int value=20 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=1470&alloc_id638&op=CCk _______________________________________________ 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