summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2014-08-08 23:38:26 +0000
committerDmitry V. Levin <ldv@altlinux.org>2014-08-08 23:38:26 +0000
commit45e7b189e2aeae06bcd1807453bde99463d8e589 (patch)
treed5bbca9aec20a004e061ee0e317f1e1b8f009b0b
parent20b84a676939cd0c4769626b88a55400d28dfe67 (diff)
downloadstrace-45e7b189e2aeae06bcd1807453bde99463d8e589.tar.gz
Prepare for -yy option support
* defs.h (show_fd_path): Change type to unsigned int. * strace.c (show_fd_path): Likewise. (init): Handle repeated -y option.
-rw-r--r--defs.h2
-rw-r--r--strace.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/defs.h b/defs.h
index b92fa7b75..625cac673 100644
--- a/defs.h
+++ b/defs.h
@@ -562,7 +562,7 @@ extern bool iflag;
extern bool count_wallclock;
extern unsigned int qflag;
extern bool not_failing_only;
-extern bool show_fd_path;
+extern unsigned int show_fd_path;
extern bool hide_log_until_execve;
/* are we filtering traces based on paths? */
extern const char **paths_selected;
diff --git a/strace.c b/strace.c
index 4154cde66..2bc5c675f 100644
--- a/strace.c
+++ b/strace.c
@@ -129,7 +129,7 @@ static int post_attach_sigstop = TCB_IGNORE_ONE_SIGSTOP;
bool not_failing_only = 0;
/* Show path associated with fd arguments */
-bool show_fd_path = 0;
+unsigned int show_fd_path = 0;
static bool detach_on_execve = 0;
/* Are we "strace PROG" and need to skip detach on first execve? */
@@ -1734,7 +1734,7 @@ init(int argc, char *argv[])
xflag++;
break;
case 'y':
- show_fd_path = 1;
+ show_fd_path++;
break;
case 'v':
qualify("abbrev=none");