From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal =?iso-8859-2?q?=C8iha=F8?= Date: Sun, 07 Mar 2004 15:46:17 +0000 Subject: Re: udev problems Message-Id: <200403071646.17676.michal@cihar.com> List-Id: References: <200403071315.02925.michal@cihar.com> In-Reply-To: <200403071315.02925.michal@cihar.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday 07 of March 2004 16:28, Michal =C8iha=F8 wrote: > Okay, I found the solution, but not the problem - attached script works. = It > builds name and then echoes complete line, while the previous one echoed = it > by parts. execute_program in namedev.c doesn't handle correctly situation when it get= =20 line split into smaller pieces (it should IMHO concatenate it till EOF or=20 \n), this leads to setting retval to -1, what is then returned. This doesn'= t=20 happen always, as it depends when pipe buffer is read/written. Debug log for this case: match_rule: check PROGRAM apply_format: format=3Dk, string=3D'/etc/udev/apacer.sh ', tail=3D' %b %n' apply_format: substitute kernel name 'sdb' apply_format: format=3Db, string=3D'/etc/udev/apacer.sh sdb ', tail=3D' %n' apply_format: substitute bus_id '57:0:0:1' apply_format: format=3Dn, string=3D'/etc/udev/apacer.sh sdb 57:0:0:1 ', tai= l=3D'' execute_program: executing '/etc/udev/apacer.sh sdb 57:0:0:1 ' execute_program: execute program '/etc/udev/apacer.sh' execute_program: result is 'cardreader-' execute_program: result value already set execute_program: result value already set match_rule: PROGRAM returned nozero - --=20 Regards Michal =C8iha=F8 http://cihar.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAS0PJ3DVS6DbnVgQRAo0nAJ9WjVuX1G0ou3UC3LrkEGX09HNQZQCfVVPf HrihustikcY3nE+flge8/4w=3DBtCH -----END PGP SIGNATURE----- ------------------------------------------------------- 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