From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KZoT6-000752-61 for mharc-grub-devel@gnu.org; Sun, 31 Aug 2008 11:03:56 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZoT4-00074x-4l for grub-devel@gnu.org; Sun, 31 Aug 2008 11:03:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZoT0-00074Z-IS for grub-devel@gnu.org; Sun, 31 Aug 2008 11:03:53 -0400 Received: from [199.232.76.173] (port=54444 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZoT0-00074W-C1 for grub-devel@gnu.org; Sun, 31 Aug 2008 11:03:50 -0400 Received: from mx20.gnu.org ([199.232.41.8]:40610) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KZoT0-0003yn-1r for grub-devel@gnu.org; Sun, 31 Aug 2008 11:03:50 -0400 Received: from ey-out-1920.google.com ([74.125.78.146]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KZoSy-0004Eg-Re for grub-devel@gnu.org; Sun, 31 Aug 2008 11:03:49 -0400 Received: by ey-out-1920.google.com with SMTP id 4so555644eyg.24 for ; Sun, 31 Aug 2008 08:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=S4rIIMJhL1AKnu9EXoSL4tW/gr9LaqezFv3Q2RF83zA=; b=ZTZibpfafcQAD3uFTO4ziBi4LR5i8wckVReu/bL4lE72DimMzFClgT4tjJM4av34eZ N5ZbjQwBAYR2FGQYCK2ydytaELbYCPdD0VPIPmvXifJ7xgibFRSADDsxFdbCUSUAl7QJ j+9fBw1Sn8eSu+WFrM5d9xgKIgldLTHIOO+70= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=u6HH89DZYKfR1iYcaHX+/Y0REzLHRvQwhJbKETV0OoPg1rDM1aggfiEXPLSPXn5Ykx dUqf/hRCzplEy6+FQoT+uaMIA1Wu1sB+NLI9Nl30jkV3LiuIALjuq4Jyzla79kxGmID0 pe46ofSS32Mc5dZMhvABmCTruWIB7Fbe7cspU= Received: by 10.210.128.5 with SMTP id a5mr5004346ebd.38.1220195026645; Sun, 31 Aug 2008 08:03:46 -0700 (PDT) Received: from ?192.168.1.100? ( [213.37.137.93]) by mx.google.com with ESMTPS id 23sm5800584eya.7.2008.08.31.08.03.44 (version=SSLv3 cipher=RC4-MD5); Sun, 31 Aug 2008 08:03:45 -0700 (PDT) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: <1220192824.4354.11.camel@fz.local> References: <1220127336.21696.30.camel@fz.local> <20080831134746.GD2688@thorin> <1220192824.4354.11.camel@fz.local> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-MXWDt2W0uv/uUWJGjUed" Date: Sun, 31 Aug 2008 17:06:10 +0200 Message-Id: <1220195170.2622.33.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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 15:03:54 -0000 --=-MXWDt2W0uv/uUWJGjUed Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable El dom, 31-08-2008 a las 16:27 +0200, Felix Zielcke escribi=C3=B3: > > > The specs say that it's allowed to contain only zeros but I think thi= s > > > shouldn't be a big problem. > >=20 > > I think this could indeed be a problem if it leads to collisions. If "= all > > zeroes" is detected, one could rise an error in uuid() function to prev= ent the > > caller from taking the value into consideration. >=20 > I have now used grub_error (GRUB_ERR_BAD_NUMBER) >=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. 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: /* ... */ grub_error (GRUB_ERR_BAD_NUMBER, "No creation date in filesystem to generate UUID."); if (uuid) *uuid =3D NULL; } else { if (uuid) { *uuid =3D /* ... */ -Habbit --=-MXWDt2W0uv/uUWJGjUed Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQIVAwUASLqzYaSl+Fbdeo72AQLn2Q/+NjZC14NN8LJxtI161W8tE/BD49CdU51A MK07g3t7rnhJdQgXrOzeMt6tZvSPxDBvNvt0RrqH7xpJFJx0KDBD7YVHldk5SI+m jHEFzlpQEJpE2VzU/aCIvK9jAXMfxHAXEaHHo5ivqQlbSQ0UdS1ZoPLsnithj8EB 29zKerYTg9wuzTIjujOo+ZYRd0k1pCfu6vsghdSYJhHmfdNEJvMdRcGLtnUX2IiV NqVtP8VTFY8PZJNe9m4/K/I8G1omAnN0XT7MTdNYHaC2nAR+Y4zaZS6Tu0rc+ACB B1YhDH/jrDReSm+k2MauM3QqzeCoqYc6bugBXmTeFdilwzZ+OBwmgsBF/jFxO2l3 y47UNYw8AmdTNnpASkQEOo26upZgtrxcqQYKBUtRJ3pHuTEOOv0Er6ye/CapfyeV QfXuI2oFHeP0OTYvgtR9GVephY7ZWTcLNFYhSgv3NLY+bz4ddkPyuvJlxbBRoVjJ 0w8WJyTnz5hFN8xefHKBuk/v8ngV74qsAggr5Fy6ESp6gg60GpFSXP+TD7zkt0ho w3ZP5umVorO185OZrMwxGadmmhWhNx4jLV1ygs55YMKWgE8qQQRbzDBz4hxnsrQE bs36UYGCBfJhIVbqN3nIg1H+9nkuWleDeVRebCPqQoxAztTgXuGGnaa6k6nukyeE CJbrmi66ULo= =oBb3 -----END PGP SIGNATURE----- --=-MXWDt2W0uv/uUWJGjUed--