diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-01-06 00:19:01 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 08:33:47 -0800 |
commit | 7eebe8a9c51686927709a57b1f2725d371014abc (patch) | |
tree | 6b1543982c8656c76c25baa7e44497d5d9de307a /arch/um/drivers/line.c | |
parent | 2264c475e4bf7427e59921953c89a5693ecb506f (diff) |
[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>
Diffstat (limited to 'arch/um/drivers/line.c')
-rw-r--r-- | arch/um/drivers/line.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index b8e3e800ee4..a3c39373adb 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c @@ -831,8 +831,8 @@ char *add_xterm_umid(char *base) char *umid, *title; int len; - umid = get_umid(1); - if(umid == NULL) + umid = get_umid(); + if(*umid == '\0') return base; len = strlen(base) + strlen(" ()") + strlen(umid) + 1; |