From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KZpP6-00080B-0g for mharc-grub-devel@gnu.org; Sun, 31 Aug 2008 12:03:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZpP4-0007yA-FE for grub-devel@gnu.org; Sun, 31 Aug 2008 12:03:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZpP2-0007vf-QR for grub-devel@gnu.org; Sun, 31 Aug 2008 12:03:50 -0400 Received: from [199.232.76.173] (port=55286 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZpP2-0007vR-Ld for grub-devel@gnu.org; Sun, 31 Aug 2008 12:03:48 -0400 Received: from moutng.kundenserver.de ([212.227.126.177]:52632) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KZpP2-0001GD-9H for grub-devel@gnu.org; Sun, 31 Aug 2008 12:03:48 -0400 Received: from [85.180.1.203] (e180001203.adsl.alicedsl.de [85.180.1.203]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1KZpP10sp3-00065E; Sun, 31 Aug 2008 18:03:47 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <1220195170.2622.33.camel@localhost> References: <1220127336.21696.30.camel@fz.local> <20080831134746.GD2688@thorin> <1220192824.4354.11.camel@fz.local> <1220195170.2622.33.camel@localhost> Content-Type: text/plain; charset=UTF-8 Date: Sun, 31 Aug 2008 18:03:46 +0200 Message-Id: <1220198626.4354.25.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V01U2FsdGVkX18ZGmYP4qm51K1W31xORD0F3mPz/8Ml+JIwH8O IVtETAlmvSffRp8iATG6O7cwHFkD2gHWLLuegAPeNPVKBfuwGC lseFwPhzQ9ZbLHPS36j8XMxvpvRx5xG X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) Subject: Re: [PATCH] iso9660 UUID support by using the creation date/time X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2008 16:03:50 -0000 Am Sonntag, den 31.08.2008, 17:06 +0200 schrieb Javier Mart=C3=ADn: Hello Javier, > El dom, 31-08-2008 a las 16:27 +0200, Felix Zielcke escribi=C3=B3: > >=20 > > But maybe it would be better to make a new type for this, though I don'= t > > have yet an idea how to call it. > > Suggestions please :) > What about: > * BAD_FS looks the most contextual here, but if the ISO9660 standard > allows filesystems to "lack" the creation date, then they are certainly > not "bad", though for the purposes of the uuid function they are - > slightly confusing. > * BAD_ARGUMENT as in "the FS you requested to id is not a valid > argument to this function", but this err code is usually applied for the > failure of argument precondition checks (non-empty device names, etc.) > * INVALID_COMMAND as in "this command cannot be applied to that FS" > * Or even NOT_IMPLEMENTED_YET as in "we still haven't figured how to id > this FS", but this seems to imply that we will eventually do. Yep not really easy to find a correct one, but luckly not that important on grub2's sourcecode the values aren't that often exactly checked as far as I could see. This is probable just about `coding style' Well let's see and wait. > By the way, reviewing BAD_ARGUMENT has reminded me that maybe the > function should check whether "uuid" is valid. If not, you don't need to > abort the operation, just the malloc and consequent sprintf. If > implemented like this in all other FSs, this would be a fast way to > check whether or not a particular FS can have an UUID extracted without > actually having to get the id itself: Actually it is currently in a fast way implemented. iso9660 filesystem currently doestn't have any UUID function at all, because it doestn't have one strictly speaking. For normal filesystems if the specs say they have an UUID field they normally always should have one. But the problem with iso9660 is that the specs say that the creation date which I use can be just zeros. I tend now too like Robert that no UUID for iso9660 + printing an error might be better then an UUID containing just zeros. util/grub-probe.c if (! fs->uuid) grub_util_error ("%s does not support UUIDs", fs->name); fs->uuid (dev, &uuid); For example fs/cpio.c still has no uuid function at all :) --=20 Felix Zielcke