- Use time.h not sys/time.h.
- Fix printf format errors. Submitted by: bde
This commit is contained in:
parent
d21a46a11e
commit
c91f45bbc5
@ -48,7 +48,6 @@ static const char rcsid[] =
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/pioctl.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <machine/reg.h>
|
||||
|
||||
@ -59,6 +58,7 @@ static const char rcsid[] =
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "truss.h"
|
||||
|
@ -46,7 +46,6 @@ static const char rcsid[] =
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/pioctl.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <machine/reg.h>
|
||||
#include <machine/psl.h>
|
||||
@ -57,6 +56,7 @@ static const char rcsid[] =
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "truss.h"
|
||||
|
@ -43,7 +43,6 @@ static const char rcsid[] =
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/pioctl.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <machine/reg.h>
|
||||
#include <machine/psl.h>
|
||||
@ -54,6 +53,7 @@ static const char rcsid[] =
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "truss.h"
|
||||
|
@ -46,7 +46,6 @@ static const char rcsid[] =
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/pioctl.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <machine/reg.h>
|
||||
#include <machine/psl.h>
|
||||
@ -57,6 +56,7 @@ static const char rcsid[] =
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "truss.h"
|
||||
|
@ -43,7 +43,6 @@ static const char rcsid[] =
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/pioctl.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <machine/reg.h>
|
||||
#include <machine/psl.h>
|
||||
@ -54,6 +53,7 @@ static const char rcsid[] =
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "truss.h"
|
||||
|
@ -43,7 +43,6 @@ static const char rcsid[] =
|
||||
#include <sys/param.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/pioctl.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
@ -52,6 +51,7 @@ static const char rcsid[] =
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "truss.h"
|
||||
|
@ -42,7 +42,6 @@ static const char rcsid[] =
|
||||
#include <sys/param.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/pioctl.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <err.h>
|
||||
@ -52,6 +51,7 @@ static const char rcsid[] =
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "truss.h"
|
||||
|
@ -48,7 +48,6 @@ static const char rcsid[] =
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/pioctl.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <machine/frame.h>
|
||||
#include <machine/reg.h>
|
||||
@ -62,6 +61,7 @@ static const char rcsid[] =
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "truss.h"
|
||||
|
@ -40,7 +40,6 @@ static const char rcsid[] =
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <netinet/in.h>
|
||||
@ -52,6 +51,7 @@ static const char rcsid[] =
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "truss.h"
|
||||
@ -417,14 +417,14 @@ print_syscall(struct trussinfo *trussinfo, const char *name, int nargs, char **s
|
||||
|
||||
if (trussinfo->flags & ABSOLUTETIMESTAMPS) {
|
||||
timespecsubt(&trussinfo->after, &trussinfo->start_time, &timediff);
|
||||
len += fprintf(trussinfo->outfile, "%d.%0.9d ",
|
||||
timediff.tv_sec, timediff.tv_nsec);
|
||||
len += fprintf(trussinfo->outfile, "%ld.%09ld ",
|
||||
(long)timediff.tv_sec, (long)timediff.tv_nsec);
|
||||
}
|
||||
|
||||
if (trussinfo->flags & RELATIVETIMESTAMPS) {
|
||||
timespecsubt(&trussinfo->after, &trussinfo->before, &timediff);
|
||||
len += fprintf(trussinfo->outfile, "%d.%0.9d ",
|
||||
timediff.tv_sec, timediff.tv_nsec);
|
||||
len += fprintf(trussinfo->outfile, "%ld.%09ld ",
|
||||
(long)timediff.tv_sec, (long)timediff.tv_nsec);
|
||||
}
|
||||
|
||||
len += fprintf(trussinfo->outfile, "%s(", name);
|
||||
|
Loading…
Reference in New Issue
Block a user