summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-04-17 22:19:31 -0400
committerDmitry V. Levin <ldv@altlinux.org>2012-04-18 15:27:25 +0000
commitebee04cfb009bdc46599774b4647f6615b6ce3a2 (patch)
treec2eef690822087a0e83361585ebd95fbdfeeb406 /util.c
parent085e42886052190d3e515ca865546b527f59cdd1 (diff)
downloadstrace-ebee04cfb009bdc46599774b4647f6615b6ce3a2.tar.gz
strace-ebee04cfb009bdc46599774b4647f6615b6ce3a2.tar.bz2
strace-ebee04cfb009bdc46599774b4647f6615b6ce3a2.tar.xz
Decode /dev/loop ioctls
Needed to debug some losetup failures, and it's easier when you can see what the kernel is getting vs what you think you're sending, so add some decoders for those ioctls. * loop.c: New file. * Makefile.am (strace_SOURCES): Add loop.c. * defs.h (loop_ioctl): New prototype. (string_quote): Likewise. * ioctl.c (ioctl_decode): Call loop_ioctl when code is 'L'. * util.c (string_quote): Remove static keyword. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 6588de2..ea03685 100644
--- a/util.c
+++ b/util.c
@@ -378,7 +378,7 @@ printuid(const char *text, unsigned long uid)
* Returns 0 if len < 0 and NUL was seen, 1 otherwise.
* Note that if len >= 0, always returns 1.
*/
-static int
+int
string_quote(const char *instr, char *outstr, int len, int size)
{
const unsigned char *ustr = (const unsigned char *) instr;