Date: Fri, 16 Dec 2005 23:15:22 +0000 From: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl> To: freebsd-current@freebsd.org Subject: [PATCH] sbuf_copyin() can return number of bytes copied from user-space Message-ID: <20051216231521.GA59072@FreeBSD.czest.pl>
next in thread | raw e-mail | index | archive | help
Hello, Function sbuf_copyin() at current stage makes no use of "done" argument, used internally. "done", which is a result of copying string from user-space address with copyinstr(), contains number of bytes copied. We can easily extend current implementation: http://freebsd.czest.pl/dunstan/FreeBSD/sbuf_copyin.0.patch I'd like to receive comments from people making use of sbuf_copyin() in their sources. This change will probably make it necessary to compare return value with -1 in order to detect failure. At current stage, existing FreeBSD code uses sbuf_copyin in two files, both ignoring return value, so this shouldn't break anything. If noone will object, above change will probably be commited. Comments are welcome! -- * Wojciech A. Koszek && dunstan@FreeBSD.czest.pl
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051216231521.GA59072>