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.
This commit is contained in:
parent
5e4019c3bc
commit
78b02c928a
8
defs.h
8
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);
|
||||
|
4
util.c
4
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);
|
||||
|
Loading…
Reference in New Issue
Block a user