1
0
Fork 0
Commit Graph

2 Commits (58591e8a1f4de2e53fdd09b2aa86948687106c07)

Author SHA1 Message Date
Jeff Dike 7eebe8a9c5 [PATCH] uml: umid cleanup
This patch cleans up the umid code:

- The only_if_set argument to get_umid is gone.

- get_umid returns an empty string rather than NULL if there is no umid.

- umid_is_random is gone since its users went away.

- Some printfs were turned into printks because the code runs late enough
  that printk is working.

- Error paths were cleaned up.

- Some functions now return an error and let the caller print the error
  message rather than printing it themselves.  This eliminates the practice of
  passing a pointer to printf or printk in, depending on where in the boot
  process we are.

- Major tidying of not_dead_yet - mostly error path cleanup, plus a comment
  explaining why it doesn't react to errors the way you might expect.

- Calls to os_* interfaces that were moved under os are changed back to
  their native libc forms.

- snprintf, strlcpy, and their bounds-checking friends are used more often,
  replacing by-hand bounds checking in some places.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:47 -08:00
Jeff Dike 2264c475e4 [PATCH] uml: separate libc-dependent umid code
I reworked Gennady's umid OS abstraction patch because the code shouldn't
be moved entirely to os.  As it turns out, I moved most of it anyway.  This
patch is the minimal one needed to move the code and have it work.
It turns out that the concept of the umid is OS-independent, but
almost everything else about the implementation is OS-dependent.

This is code movement without cleanup - a follow-on patch tidies
everything up without shuffling code around.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:47 -08:00