Messages in this thread | | | Date | Tue, 18 Dec 2007 12:13:43 -0600 | From | Matt Mackall <> | Subject | Re: Top kernel oopses/warnings this week |
| |
On Tue, Dec 18, 2007 at 10:06:14AM -0800, Arjan van de Ven wrote: > Linus Torvalds wrote: > > > >On Mon, 17 Dec 2007, Arjan van de Ven wrote: > >>+char *get_boot_uuid(void) > >>+{ > >>+ static char target[38]; > >>+ unsigned char *uuid; > >>+ > >>+ if (sysctl_bootid[8] == 0) > >>+ generate_random_uuid(sysctl_bootid); > >>+ /* sysctl_bootid is signed, to print we need unsigned .. */ > >>+ uuid = sysctl_bootid; > >>+ > >>+ if (target[0] == 0) { > >>+ sprintf(target, > >>"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-" > >>+ "%02x%02x%02x%02x%02x%02x", > > > >Why isn't *everything* inside that "if (target[0] == 0" check? > > > >IOW, that function should look something like > > > ok so this got a lot more involved than I was hoping for; > something like below will help me (and kerneloops.org ;) for the short term, > while I'll see what I can do for random.c in a few dead moments soon, for a > 2.6.25 > enhancement...
Might as well leave out the null UUID, no sense in claiming to have one when you don't. It's easy for a parser to cut on "^---["
-- Mathematics is the supreme nostalgia of our time.
| |