diff options
author | des <des@FreeBSD.org> | 2001-06-10 10:34:21 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2001-06-10 10:34:21 +0000 |
commit | 2516536ce6c83dee163d1156c12ba20a9d9168c2 (patch) | |
tree | 7380bfb6e0cbcc878e06097f76ed9dc0dbe9568c /sys/fs/pseudofs/pseudofs_vnops.c | |
parent | 79777bd9e9935de08019d08531cd0f36b06f23af (diff) | |
download | FreeBSD-src-2516536ce6c83dee163d1156c12ba20a9d9168c2.zip FreeBSD-src-2516536ce6c83dee163d1156c12ba20a9d9168c2.tar.gz |
Catch up with the change in sbuf_new's prototype.
Diffstat (limited to 'sys/fs/pseudofs/pseudofs_vnops.c')
-rw-r--r-- | sys/fs/pseudofs/pseudofs_vnops.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c index 5516100..30995a1 100644 --- a/sys/fs/pseudofs/pseudofs_vnops.c +++ b/sys/fs/pseudofs/pseudofs_vnops.c @@ -214,26 +214,26 @@ pfs_read(struct vop_read_args *va) struct vnode *vn = va->a_vp; struct pfs_node *pn = vn->v_data; struct uio *uio = va->a_uio; - struct sbuf sb; + struct sbuf *sb = NULL; char *ps; int error, xlen; if (vn->v_type != VREG) return (EINVAL); - error = sbuf_new(&sb, NULL, uio->uio_offset + uio->uio_resid, 0); - if (error) + sb = sbuf_new(sb, NULL, uio->uio_offset + uio->uio_resid, 0); + if (sb == NULL) return (EIO); - error = (pn->pn_func)(pn, curproc, &sb); + error = (pn->pn_func)(pn, curproc, sb); /* XXX we should possibly detect and handle overflows */ - sbuf_finish(&sb); - ps = sbuf_data(&sb) + uio->uio_offset; - xlen = sbuf_len(&sb) - uio->uio_offset; + sbuf_finish(sb); + ps = sbuf_data(sb) + uio->uio_offset; + xlen = sbuf_len(sb) - uio->uio_offset; xlen = imin(xlen, uio->uio_resid); error = (xlen <= 0 ? 0 : uiomove(ps, xlen, uio)); - sbuf_delete(&sb); + sbuf_delete(sb); return (error); } |