aboutsummaryrefslogtreecommitdiff
path: root/toys/other/pmap.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-09-03 17:56:28 -0500
committerRob Landley <rob@landley.net>2013-09-03 17:56:28 -0500
commit8fdcfdb4479dff7a993a25a63253f0e749fd99fe (patch)
tree99c94cfa5e698ff01b2dcdbb9a45d1f9a0abec21 /toys/other/pmap.c
parentf538f420deffc242742ce2d0661a39fa9a3b5399 (diff)
downloadtoybox-8fdcfdb4479dff7a993a25a63253f0e749fd99fe.tar.gz
Introduce libbuf analogous to toybuf but for use by lib/*.c. Change readfile() semantics to be able to read into an existing buffer, or malloc its own if that's NULL.
Diffstat (limited to 'toys/other/pmap.c')
-rw-r--r--toys/other/pmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/pmap.c b/toys/other/pmap.c
index 012280dd..1cc04220 100644
--- a/toys/other/pmap.c
+++ b/toys/other/pmap.c
@@ -35,7 +35,7 @@ void pmap_main(void)
int count, xx = 0;
snprintf(toybuf, sizeof(toybuf), "/proc/%u/cmdline", pid);
- line = readfile(toybuf);
+ line = readfile(toybuf, 0, 0);
if (!line) error_msg("No %lu", (long)pid);
xprintf("%u: %s\n", (int)pid, line);
free(line);