linux/arch/um
Jeff Dike c59dbcadd5 uml: fix console writing bugs
The previous console cleanup patch switched generic_read and generic_write
from calling os_{read,write}_file to calling read and write directly.  Because
the calling convention is different, they now need to get any error from errno
rather than the return value.  I did this for generic_read, but forgot about
generic_write.

While chasing some output corruption, I noticed that line_write was
unnecessarily calling flush_buffer, and deleted it.  I don't understand why,
but the corruption disappeared.  This is unneeded because there already is a
perfectly good mechanism for finding out when the host output device has some
room to write data - there is an interrupt that comes in when writes can
happen again.  line_write calling flush_buffer seemed to just be an attempt to
opportunistically get some data out to the host.

I also made write_chan short-circuit calling into the host-level code for
zero-length writes.  Calling libc write with a length of zero conflated write
not being able to write anything with asking it not to write anything.  Better
to just cut it off as soon as possible.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16 09:43:04 -07:00
..
drivers uml: fix console writing bugs 2007-10-16 09:43:04 -07:00
include uml: tidy recently-moved code 2007-10-16 09:43:04 -07:00
kernel Consolidate PTRACE_DETACH 2007-10-16 09:42:49 -07:00
os-Linux uml: tidy recently-moved code 2007-10-16 09:43:04 -07:00
scripts minimal build fixes for uml (fallout from x86 merge) 2007-10-13 09:57:15 -07:00
sys-i386 minimal build fixes for uml (fallout from x86 merge) 2007-10-13 09:57:15 -07:00
sys-ia64 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys-ppc uml: remove user_util.h 2007-05-07 12:13:01 -07:00
sys-x86_64 minimal build fixes for uml (fallout from x86 merge) 2007-10-13 09:57:15 -07:00
defconfig i386: Allow KVM on i386 nonpae 2007-07-19 14:37:05 -07:00
Kconfig uml: fix kernel stack size on x86_64 2007-06-08 17:23:33 -07:00
Kconfig.char [PATCH] uml: enable RAW 2007-03-01 14:53:38 -08:00
Kconfig.debug Add generic exit-time stack-depth checking to CONFIG_DEBUG_STACK_USAGE 2007-07-16 09:05:38 -07:00
Kconfig.i386 [PATCH] fix indentation-related breakage in Kconfig.i386 2007-01-30 08:39:21 -08:00
Kconfig.net [PATCH] uml: Rename Kconfig files to be like the other arches 2005-09-05 00:06:19 -07:00
Kconfig.x86_64 [PATCH] um: fix undefined reference to hweight32 2006-03-26 08:57:09 -08:00
Makefile minimal build fixes for uml (fallout from x86 merge) 2007-10-13 09:57:15 -07:00
Makefile-i386 minimal build fixes for uml (fallout from x86 merge) 2007-10-13 09:57:15 -07:00
Makefile-ia64 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile-os-Linux Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile-ppc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile-skas [PATCH] uml makefiles sanitized 2005-09-29 08:46:26 -07:00
Makefile-tt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile-x86_64 minimal build fixes for uml (fallout from x86 merge) 2007-10-13 09:57:15 -07:00