aboutsummaryrefslogtreecommitdiffstats
path: root/sys/miscfs/procfs/procfs_rlimit.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/miscfs/procfs/procfs_rlimit.c')
-rw-r--r--sys/miscfs/procfs/procfs_rlimit.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/sys/miscfs/procfs/procfs_rlimit.c b/sys/miscfs/procfs/procfs_rlimit.c
index 361f6f6e9d7d..552e901c9798 100644
--- a/sys/miscfs/procfs/procfs_rlimit.c
+++ b/sys/miscfs/procfs/procfs_rlimit.c
@@ -64,7 +64,6 @@ procfs_dorlimit(curp, p, pfs, uio)
{
char *ps;
int i;
- int xlen;
int error;
char psbuf[512]; /* XXX - conservative */
@@ -109,20 +108,7 @@ procfs_dorlimit(curp, p, pfs, uio)
}
}
- /*
- * This logic is rather tasty - but its from procfs_status.c, so
- * I guess I'll use it here.
- */
-
- xlen = ps - psbuf;
- xlen -= uio->uio_offset;
- ps = psbuf + uio->uio_offset;
- xlen = imin(xlen, uio->uio_resid);
- if (xlen <= 0)
- error = 0;
- else
- error = uiomove(ps, xlen, uio);
-
+ error = uiomove_frombuf(psbuf, ps - psbuf, uio);
return (error);
}