]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit - share/man/man9/sglist.9
MFC 196417:
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 21 Aug 2009 03:14:39 +0000 (03:14 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 21 Aug 2009 03:14:39 +0000 (03:14 +0000)
commit5ea8add93e9fed9584454cf0347ffbf36ea73fd1
treee4bf55c908b33b4fa0924d820849bd67ff1d105b
parent549f1fc25470b827a61619a3e75ab8e4cce88766
MFC 196417:
This patch fixes two bugs in sglist(9) and improves robustness of the API via
better semantics if a request to append an address range to an existing list
fails.
- When cloning an sglist, properly set the length in the new sglist instead of
  leaving the new list empty.
- Properly compute the amount of data added to an sglist via
  _sglist_append_buf().  This allows sglist_consume_uio() to properly update
  uio_resid.
- When a request to append an address range to a scatter/gather list fails,
  restore the sglist to the state it had at the start of the function call
  instead of resetting it to an empty list.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196418 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
share/man/man9/sglist.9
sys/kern/subr_sglist.c