]> granicus.if.org Git - strace/commitdiff
printpath*: change address argument type from long to kernel_ureg_t
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 20 Dec 2016 22:06:34 +0000 (22:06 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 11:32:43 +0000 (11:32 +0000)
* defs.h (printpath, printpathn): Change address argument type
from long to kernel_ureg_t.
* util.c (printpath, printpathn): Likewise.

defs.h
util.c

diff --git a/defs.h b/defs.h
index a4e8b67247969a12221af895df25e3ac147a6091..8c4165cafbf609eeedcc7de576e1d83cfddea320 100644 (file)
--- 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 537e796cb851a9c769e9dcd7bf1933294d00236f..71bb6509c766bfd12ac668f2ccf1cb36e3fb6203 100644 (file)
--- 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);