On Sat, Aug 30, 2008 at 10:15:36PM +0200, Felix Zielcke wrote: > Here's a patch which implements UUID support for the iso9660 filesystem, > by using the creation date in the `superblock'.
Nice work :-) > The specs say that it's allowed to contain only zeros but I think this > shouldn't be a big problem. 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 prevent the caller from taking the value into consideration. > + *uuid = grub_malloc (sizeof (struct grub_iso9660_date) + sizeof > ('\0')); > + grub_sprintf (*uuid, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%02u", > + data->voldesc.created.year[0], > data->voldesc.created.year[1], > + data->voldesc.created.year[2], > data->voldesc.created.year[3], > + data->voldesc.created.month[0], > data->voldesc.created.month[1], > + data->voldesc.created.day[0], data->voldesc.created.day[1], > + data->voldesc.created.hour[0], > data->voldesc.created.hour[1], > + data->voldesc.created.minute[0], > data->voldesc.created.minute[1], > + data->voldesc.created.second[0], > data->voldesc.created.second[2], > + data->voldesc.created.hundredth[0], > data->voldesc.created.hundredth[1], > + data->voldesc.created.offset); Since the string contains human-readable information, may I suggest separating it with dashes to make it easier to comprehend? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel