From 487ab975166234c1543e8ac09b36853053ad6675 Mon Sep 17 00:00:00 2001 From: zhaolei Date: Mon, 15 Oct 2007 05:24:01 +0000 Subject: 2007-10-15 Zhaolei From Cai Fei * conversions.stp: Add a function kernel_string_n for copy non-0-terminated string with fixed length from kernel space at given address. * stapfuncs.5.in: Add kernel_string_n. * nfsd.stp: Using kernel_string_n to copy non-0-terminated string with fixed length from kernel space at given address. * nfs_proc.stp: Ditto. --- stapfuncs.5.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'stapfuncs.5.in') diff --git a/stapfuncs.5.in b/stapfuncs.5.in index fe8c45b8..f771fd5a 100644 --- a/stapfuncs.5.in +++ b/stapfuncs.5.in @@ -73,6 +73,12 @@ or if a user-space access would cause a fault. kernel_string:string (addr:long) Copy a 0-terminated string from kernel space at given address. .TP +kernel_string_n:string (addr:long, n:long) +Similar with kernel_string, except that not more than n bytes are copied. +Thus, if there are null bytes among the first n bytes, it is same as +kernel_string(addr). If not, n bytes will be copied and a null byte will +be padded to the end. +.TP kernel_long:long (addr:long) Copy a long from kernel space at given address. .TP -- cgit