From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Nqo7K-0006U6-6P for mharc-grub-devel@gnu.org; Sun, 14 Mar 2010 09:44:30 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nqo7J-0006TU-1B for grub-devel@gnu.org; Sun, 14 Mar 2010 09:44:29 -0400 Received: from [140.186.70.92] (port=39104 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nqo7G-0006TC-63 for grub-devel@gnu.org; Sun, 14 Mar 2010 09:44:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nqo7E-0006rd-1S for grub-devel@gnu.org; Sun, 14 Mar 2010 09:44:25 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:53465) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nqo7D-0006rW-Ss for grub-devel@gnu.org; Sun, 14 Mar 2010 09:44:24 -0400 Received: by bwz19 with SMTP id 19so2572071bwz.26 for ; Sun, 14 Mar 2010 06:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=LbAGvD97C+I2JXndWKoG+gK6PF+Na96wuX1NHBgNRZw=; b=khnN92/MZNgzVh0/vr3WIuVM4VpPUUCxBGv/0oVMA9xJQ0tbZj18hsNKoQOkGr5cl3 uIPCQdUDpokenLtUDSsN5PdmJGScxgoBJLbJJQip8sZIP5dGbi9/nXjHcxDsz8sq5wnH yjH9tlFMejJ18KRNZJY6n4rWUTQM/mMKISRQc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=qXG6X3jMfs6DjhrME5O8GFnBe3PW1HaHX1ICJv0/3SVnmfqbzjxH0ww6+Ul2TLLeQ6 fwUjVNEruF6pnk0geZ7X8GYr3+XX4ydO9cNKMDVadIdlqFR+IfRUdsIaRQSAO+mmuGwj NBX1KCDxYSH7KPaG4GxDKER2p09ycAAXY8FFI= Received: by 10.204.16.194 with SMTP id p2mr2534163bka.32.1268574262575; Sun, 14 Mar 2010 06:44:22 -0700 (PDT) Received: from debian.bg45.phnet (74.101.202.62.cust.bluewin.ch [62.202.101.74]) by mx.google.com with ESMTPS id 16sm2147802bwz.5.2010.03.14.06.44.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Mar 2010 06:44:19 -0700 (PDT) Message-ID: <4B9CE82B.8070106@gmail.com> Date: Sun, 14 Mar 2010 14:44:11 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: The development of GNU GRUB References: <201002161906.07800.szymon@janc.net.pl> <4B7AE0F3.1000706@gmail.com> <201002282238.48753.szymon@janc.net.pl> In-Reply-To: <201002282238.48753.szymon@janc.net.pl> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig6CCDD1D0751976717C619CE5" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] transparent file reader X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2010 13:44:29 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6CCDD1D0751976717C619CE5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Szymon Janc wrote: > Dnia wtorek 16 luty 2010 o 19:16:19 Vladimir '=CF=86-coder/phcoder' Ser= binenko=20 > napisa=C5=82(a): > > =20 >> I like the patch however few comments: >> 1) How are filters ordered? >> 2) How would I selectively disable a filter. E.g. for hexdump or when >> payload expects compressed data? >> >> +/* Registered filters list. */ >> +static grub_io_filter_t grub_io_filter_list =3D NULL; >> + >> +void grub_io_register(grub_io_filter_t filter) >> +{ >> + filter->next =3D grub_io_filter_list; >> + grub_io_filter_list =3D filter; >> +} >> + >> >> list.h can be used for this. >> =20 > > Attached is new version, changes since previous one: > - use list.h > - filter registration is priority based > - filter can be disabled for next open by grub_io_filter_disable() > > Interface could be simpler if make it only transparent/non-transparent = but=20 > this is somewhat less flexible. Yet, is it really needed? > > =20 First of all I would prefer not_easily_seekable part to be a separate patches so it would be easier to pinpoint bugs by bisecting. + .prio =3D 1, This should be macroifyed e.g GRUB_IOFILTER_PRIO_COMPRESSOR grub_io_register, grub_io_unregister and grub_io_filter_disable must be = inlined. Last one has to be splitted into grub_io_filter_disable and grub= _io_filter_disable_all to avoid special case with "". va_arg in grub_io_f= ilter_disable doesn't justify itself (one can always make 2 calls, especi= ally if function would be inlined > -----------------------------------------------------------------------= - > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig6CCDD1D0751976717C619CE5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iF4EAREKAAYFAkuc6DIACgkQNak7dOguQgm05QD9Hxu2toQWPwx4zLi4ApyqCkJ9 ZHF/F/nLjdYUbvtZ+J8BAKn9lliBjhPABTtDSlH/Q9feA6akQ8QKvM6vpSK/U1Dc =8gY/ -----END PGP SIGNATURE----- --------------enig6CCDD1D0751976717C619CE5--