From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Ndv9p-0001Zf-LG for mharc-grub-devel@gnu.org; Sat, 06 Feb 2010 19:37:49 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ndv9n-0001XJ-Ug for grub-devel@gnu.org; Sat, 06 Feb 2010 19:37:47 -0500 Received: from [199.232.76.173] (port=53391 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ndv9n-0001We-HM for grub-devel@gnu.org; Sat, 06 Feb 2010 19:37:47 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ndv9m-0001Dr-Im for grub-devel@gnu.org; Sat, 06 Feb 2010 19:37:47 -0500 Received: from mail-ew0-f228.google.com ([209.85.219.228]:61147) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ndv9m-0001DY-7O for grub-devel@gnu.org; Sat, 06 Feb 2010 19:37:46 -0500 Received: by ewy28 with SMTP id 28so1086449ewy.8 for ; Sat, 06 Feb 2010 16:37:45 -0800 (PST) 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=/uhlrSf/Oh65TM2+0kFmodo1YxsDl/QgHz89k1ZXcP8=; b=SADhNhoNNdvcRGqxPo8+OtkLHsekBGVVgg6eTJMkniPTzDsROMpw3V7+kzOHMbKEOg Ik1KGCZwrezXrnyMbLxq699uVeRNbbYE6KyeZCwHNv0Grxr8sky7T0r2XecXhzIObOwe CG+1BhIjPx1WtBLy/5D+nryvGQHaKOSrteO1g= 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=jRBOFiEIupCiFGaCBAPO6coLpmtVUvoED3KRQLjGTyBULy5dUW46w8Y5LiyNFDs25y /zLvVtfeYqP38hjDv5CKj9AORUVd4PCvVoBPJ7DjkpRZOPbS1wOMU3a5Xwp9Oy1wAfGC 4b+hl3g3U6tUhO+J3Fnx61303c/lH2inAoYi4= Received: by 10.213.1.143 with SMTP id 15mr4033613ebf.42.1265503065381; Sat, 06 Feb 2010 16:37:45 -0800 (PST) Received: from debian.bg45.phnet (90-107.2-85.cust.bluewin.ch [85.2.107.90]) by mx.google.com with ESMTPS id 14sm2053437ewy.7.2010.02.06.16.37.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 06 Feb 2010 16:37:43 -0800 (PST) Message-ID: <4B6E0B4F.9030209@gmail.com> Date: Sun, 07 Feb 2010 01:37:35 +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: <20100125080620.GA14131@thorin> <4B5DFB57.5020703@t-online.de> In-Reply-To: <4B5DFB57.5020703@t-online.de> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig2F1C68E92C2F0782C9EE3014" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: On gratuitous modularization 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, 07 Feb 2010 00:37:48 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2F1C68E92C2F0782C9EE3014 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Christian Franke wrote: > Hi Robert, > > Robert Millan wrote: > >> Please be careful when adding modules. I see that too often new modul= es >> are added without any real need to host this code separately. >> >> There are many examples where this happened. I just noticed: >> >> commands/hdparm.c: struct grub_disk_ata_pass_through_parms apt; >> commands/hdparm.c: if (grub_disk_ata_pass_through (disk,&apt)) >> commands/hdparm.c: struct grub_disk_ata_pass_through_parms apt; >> commands/hdparm.c: if (grub_disk_ata_pass_through (disk,&apt)) >> commands/hdparm.c: struct grub_disk_ata_pass_through_parms apt; >> commands/hdparm.c: if (grub_disk_ata_pass_through (disk,&apt)) >> commands/hdparm.c: if (! grub_disk_ata_pass_through) >> disk/ata_pthru.c: struct >> grub_disk_ata_pass_through_parms *parms) >> disk/ata_pthru.c: grub_disk_ata_pass_through =3D grub_ata_pass_throug= h; >> disk/ata_pthru.c: if (grub_disk_ata_pass_through =3D=3D >> grub_ata_pass_through) >> disk/ata_pthru.c: grub_disk_ata_pass_through =3D NULL; >> include/grub/disk.h:struct grub_disk_ata_pass_through_parms >> include/grub/disk.h:extern grub_err_t (* >> EXPORT_VAR(grub_disk_ata_pass_through)) (grub_disk_t, >> include/grub/disk.h: struct >> grub_disk_ata_pass_through_parms *); >> kern/disk.c:grub_err_t (* grub_disk_ata_pass_through) (grub_disk_t, >> kern/disk.c: struct grub_disk_ata_pass_through_parms *); >> >> this seems unnecessary. ata_pthru is very small. If it's only used >> by hdparm, >> why not just merge it? This also avoids the additional code in kernel= =2E >> >> =20 > > The module ata_pthru.mod exists only to keep ata.mod small, see: > http://lists.gnu.org/archive/html/grub-devel/2009-02/msg00091.html > > Keeping the ata.mod specific pass-through function separate from > hdparm.mod was intentional. Merging this function into hdparm.mod > would only make sense if ata.mod will the only ATA access module with > pass-through functionality in the future. Hdparm.mod would then depend > on ata.mod. A 'hdparm -h' would load ata.mod and disable biosdisk acces= s. > > I hope we will eventually have an ahci.mod :-) > Are the parameters of current ata_pass_through ATA-specific or would they be the same on AHCI? > BTW: I agree that using a global function pointer > 'grub_disk_ata_pass_through' is a hack. A cleaner design would be > possible with a grub_disk_dev.ioctl(.) call. > --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig2F1C68E92C2F0782C9EE3014 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 iF4EAREKAAYFAktuC1YACgkQNak7dOguQgl0MgEAkKHV6DKiJ3SAtAs3KmBBl12w qY2Q3Mn/Rm0yS62ZeR0A/R3rr6gr4qUNsC60GVOystCv5TlKcczKgUUaFb9pHNZH =S9pT -----END PGP SIGNATURE----- --------------enig2F1C68E92C2F0782C9EE3014--