=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/kdump/kdump.c,v retrieving revision 1.127 retrieving revision 1.128 diff -u -r1.127 -r1.128 --- src/usr.bin/kdump/kdump.c 2016/03/30 08:00:01 1.127 +++ src/usr.bin/kdump/kdump.c 2016/06/02 22:47:13 1.128 @@ -1,4 +1,4 @@ -/* $OpenBSD: kdump.c,v 1.127 2016/03/30 08:00:01 guenther Exp $ */ +/* $OpenBSD: kdump.c,v 1.128 2016/06/02 22:47:13 tedu Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -185,11 +185,11 @@ if (errstr) errx(1, "-p %s: %s", optarg, errstr); break; - case 'R': - timestamp = 2; /* relative timestamp */ + case 'R': /* relative timestamp */ + timestamp = timestamp == 1 ? 3 : 2; break; case 'T': - timestamp = 1; + timestamp = timestamp == 2 ? 3 : 1; break; case 't': trpoints = getpoints(optarg); @@ -349,7 +349,11 @@ basecol += printf("/%-7ld", (long)kth->ktr_tid); basecol += printf(" %-8.*s ", MAXCOMLEN, kth->ktr_comm); if (timestamp) { - if (timestamp == 2) { + if (timestamp == 3) { + if (prevtime.tv_sec == 0) + prevtime = kth->ktr_time; + timespecsub(&kth->ktr_time, &prevtime, &temp); + } else if (timestamp == 2) { timespecsub(&kth->ktr_time, &prevtime, &temp); prevtime = kth->ktr_time; } else