diff options
author | Scott Lystig Fritchie <[email protected]> | 2011-11-17 00:45:50 -0600 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-03-22 18:16:13 +0100 |
commit | 2f532f889a6bd31f74122bd223277d7c609f7bdc (patch) | |
tree | 8c0463bf781059147caeb31c2594ed211d4854e6 /erts/lib_src/common | |
parent | 0331c29e0e494d4c1e4fdd05e48a3f88a8caea0b (diff) | |
download | otp-2f532f889a6bd31f74122bd223277d7c609f7bdc.tar.gz otp-2f532f889a6bd31f74122bd223277d7c609f7bdc.tar.bz2 otp-2f532f889a6bd31f74122bd223277d7c609f7bdc.zip |
Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 3/4
Add probes to the virtual machine, except (mostly) the efile_drv.c
driver and other file I/O-related source files.
Diffstat (limited to 'erts/lib_src/common')
-rw-r--r-- | erts/lib_src/common/erl_printf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/lib_src/common/erl_printf.c b/erts/lib_src/common/erl_printf.c index 108a8bb531..afb9c0abb7 100644 --- a/erts/lib_src/common/erl_printf.c +++ b/erts/lib_src/common/erl_printf.c @@ -176,16 +176,18 @@ write_sn(void *vwsnap, char* buf, size_t len) write_sn_arg_t *wsnap = (write_sn_arg_t *) vwsnap; ASSERT(wsnap); ASSERT(len > 0); + int rv = 0; if (wsnap->len > 0) { size_t sz = len; if (sz >= wsnap->len) sz = wsnap->len; + rv = (int)sz; memcpy((void *) wsnap->buf, (void *) buf, sz); wsnap->buf += sz; wsnap->len -= sz; return sz; } - return 0; + return rv; } static int |