On Thu, May 08, 2008 at 01:39:47AM +0800, Bean wrote: > > Yes, UUID can be useful, it's better to add it to grub2. > > UUID itself is quite easy to get, but the question is how to integrate > it with the existing disk layer. I'm thinking of the following three > implementation: > > 1, Add a function pointer to fs structure to retrieve UUID, just like label. > 2. Add a data pointer to the disk structure, the fs driver allocated > memory when it found UUID. > 3. Use a separate module to handle UUID. fs driver that found UUID can > add disk to uuid mapping using exported service. > > Would someone comment on the ideas ?
I'm not completely filled on the basics of UUID. The location of this information is defined by the filesystem implementation, right? In that case, I'd suggest a function to fetch it from grub_fs rather than a location where it's always copied to. This allows filesystems that don't implement it to leave a NULL in it, and doesn't force GRUB to process it every time (saving time when loading filesystems where UUID isn't going to be used). Then search.mod could simply do: if (fs->get_uuid) my_uuid = fs->get_uuid (); would that be enough? -- Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.) _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel