From 78b02c928a4d8cf806d3e9d7423b52e6d8806fe9 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 20 Dec 2016 22:06:34 +0000 Subject: [PATCH] printpath*: change address argument type from long to kernel_ureg_t * defs.h (printpath, printpathn): Change address argument type from long to kernel_ureg_t. * util.c (printpath, printpathn): Likewise. --- defs.h | 8 ++++++-- util.c | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/defs.h b/defs.h index a4e8b672..8c4165ca 100644 --- a/defs.h +++ b/defs.h @@ -651,8 +651,12 @@ DECL_PRINTPAIR(int); DECL_PRINTPAIR(int64); #undef DECL_PRINTPAIR -extern void printpath(struct tcb *, long); -extern void printpathn(struct tcb *, long, unsigned int); +extern void +printpathn(struct tcb *, kernel_ureg_t addr, unsigned int n); + +extern void +printpath(struct tcb *, kernel_ureg_t addr); + #define TIMESPEC_TEXT_BUFSIZE \ (sizeof(intmax_t)*3 * 2 + sizeof("{tv_sec=%jd, tv_nsec=%jd}")) extern void printfd(struct tcb *, int); diff --git a/util.c b/util.c index 537e796c..71bb6509 100644 --- a/util.c +++ b/util.c @@ -813,7 +813,7 @@ print_quoted_string(const char *str, unsigned int size, * If path length exceeds `n', append `...' to the output. */ void -printpathn(struct tcb *tcp, long addr, unsigned int n) +printpathn(struct tcb *const tcp, const kernel_ureg_t addr, unsigned int n) { char path[PATH_MAX + 1]; int nul_seen; @@ -840,7 +840,7 @@ printpathn(struct tcb *tcp, long addr, unsigned int n) } void -printpath(struct tcb *tcp, long addr) +printpath(struct tcb *const tcp, const kernel_ureg_t addr) { /* Size must correspond to char path[] size in printpathn */ printpathn(tcp, addr, PATH_MAX); -- 2.40.0