grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] iso9660 UUID support by using the creation date/time


From: Felix Zielcke
Subject: Re: [PATCH] iso9660 UUID support by using the creation date/time
Date: Sun, 31 Aug 2008 18:03:46 +0200

Am Sonntag, den 31.08.2008, 17:06 +0200 schrieb Javier Martín:

Hello Javier,

> El dom, 31-08-2008 a las 16:27 +0200, Felix Zielcke escribió:
> > 
> > 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 :)

-- 
Felix Zielcke





reply via email to

[Prev in Thread] Current Thread [Next in Thread]