+2002-11-06 Michal Ludvig <mludvig@suse.cz>
+
+ From Marty Leisner <leisner@rochester.rr.com>,
+ rewritten my mludvig:
+ * strace.c (not_failing_only): New.
+ (usage): Added -z switch description.
+ (main): Added -z switch parsing to not_failing_only variable.
+ * syscall.c (trace_syscall): Added not_failing_only handling.
+
2002-10-08 Heiko Carstens <heiko.carstens@de.ibm.com>
Missing complete changelog for 2002-10-07 commit:
int iflag = 0, xflag = 0, qflag = 0;
int pflag_seen = 0;
+/* Sometimes we want to print only succeeding syscalls. */
+int not_failing_only = 0;
+
char *username = NULL;
uid_t run_uid;
gid_t run_gid;
-s strsize -- limit length of print strings to STRSIZE chars (default %d)\n\
-S sortby -- sort syscall counts by: time, calls, name, nothing (default %s)\n\
-u username -- run command as username handling setuid and/or setgid\n\
+-z -- print only succeeding syscalls\n\
", DEFAULT_ACOLUMN, DEFAULT_STRLEN, DEFAULT_SORTBY);
exit(exitval);
}
set_sortby(DEFAULT_SORTBY);
set_personality(DEFAULT_PERSONALITY);
while ((c = getopt(argc, argv,
- "+cdfFhiqrtTvVxa:e:o:O:p:s:S:u:")) != EOF) {
+ "+cdfFhiqrtTvVxza:e:o:O:p:s:S:u:")) != EOF) {
switch (c) {
case 'c':
cflag++;
printf("%s\n", version);
exit(0);
break;
+ case 'z':
+ not_failing_only = 1;
+ break;
case 'a':
acolumn = atoi(optarg);
break;
if (tcp->scno >= nsyscalls || tcp->scno < 0
|| (qual_flags[tcp->scno] & QUAL_RAW))
sys_res = printargs(tcp);
- else
+ else {
+ if (not_failing_only && tcp->u_error)
+ return; /* ignore failed syscalls */
sys_res = (*sysent[tcp->scno].sys_func)(tcp);
+ }
u_error = tcp->u_error;
tprintf(") ");
tabto(acolumn);