extern bool count_wallclock;
extern unsigned int qflag;
extern bool not_failing_only;
+extern bool failing_only;
extern unsigned int show_fd_path;
/* are we filtering traces based on paths? */
extern struct path_set {
static int post_attach_sigstop = TCB_IGNORE_ONE_SIGSTOP;
#define use_seize (post_attach_sigstop == 0)
-/* Sometimes we want to print only succeeding syscalls. */
+/* Sometimes we want to print succeeding/failing syscalls only. */
bool not_failing_only;
+bool failing_only;
/* Show path associated with fd arguments */
unsigned int show_fd_path;
*/
/* this is broken, so don't document it
-z -- print only succeeding syscalls\n\
+-Z -- print only failing syscalls\n\
*/
, DEFAULT_ACOLUMN, DEFAULT_STRLEN, DEFAULT_SORTBY);
exit(0);
#ifdef ENABLE_STACKTRACE
"k"
#endif
- "a:Ab:cCdDe:E:fFhiI:o:O:p:P:qrs:S:tTu:vVwxX:yz")) != EOF) {
+ "a:Ab:cCdDe:E:fFhiI:o:O:p:P:qrs:S:tTu:vVwxX:yzZ")) != EOF) {
switch (c) {
case 'a':
acolumn = string_to_uint(optarg);
case 'z':
not_failing_only = 1;
break;
+ case 'Z':
+ failing_only = 1;
+ break;
default:
error_msg_and_help(NULL);
break;
* whereas the intended result is that open(...) line
* is not shown at all.
*/
- if (not_failing_only && tcp->u_error)
- return 0; /* ignore failed syscalls */
+ if ((not_failing_only && syserror(tcp)) ||
+ (failing_only && !syserror(tcp)))
+ return 0; /* ignore failed/successful
+ * syscalls */
if (tcp->sys_func_rval & RVAL_DECODED)
sys_res = tcp->sys_func_rval;
else