From 8fdcfdb4479dff7a993a25a63253f0e749fd99fe Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 3 Sep 2013 17:56:28 -0500 Subject: 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. --- toys/other/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other') 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); -- cgit v1.2.3