version 1.111, 2005/08/31 09:54:54
|
version 1.112, 2005/09/01 06:25:26
|
Line 427 kernfs_xread(kfs, off, bufp, len, wrlen)
|
Line 427 kernfs_xread(kfs, off, bufp, len, wrlen)
|
* message buffer header are corrupted, but that'll cause |
* message buffer header are corrupted, but that'll cause |
* the system to die anyway. |
* the system to die anyway. |
*/ |
*/ |
if (off < 0) { |
|
*wrlen = 0; |
|
return EINVAL; |
|
} |
|
if (off >= msgbufp->msg_bufs) { |
if (off >= msgbufp->msg_bufs) { |
*wrlen = 0; |
*wrlen = 0; |
return (0); |
return (0); |
Line 943 kernfs_read(v)
|
Line 939 kernfs_read(v)
|
if (ap->a_vp->v_type == VDIR) |
if (ap->a_vp->v_type == VDIR) |
return (EOPNOTSUPP); |
return (EOPNOTSUPP); |
|
|
|
/* Don't allow negative offsets */ |
|
if (uio->uio_offset < 0) |
|
return EINVAL; |
|
|
off = uio->uio_offset; |
off = uio->uio_offset; |
bf = strbuf; |
bf = strbuf; |
if ((error = kernfs_xread(kfs, off, &bf, sizeof(strbuf), &len)) == 0) |
if ((error = kernfs_xread(kfs, off, &bf, sizeof(strbuf), &len)) == 0) |