From: Dmitry V. Levin Date: Fri, 8 Aug 2014 23:38:26 +0000 (+0000) Subject: Prepare for -yy option support X-Git-Tag: v4.9~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45e7b189e2aeae06bcd1807453bde99463d8e589;p=platform%2Fupstream%2Fstrace.git 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. --- diff --git a/defs.h b/defs.h index b92fa7b7..625cac67 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 4154cde6..2bc5c675 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");