Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

print_timex.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
  3. * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  4. * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
  5. * Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
  6. * Copyright (c) 2015-2019 The strace developers.
  7. * All rights reserved.
  8. *
  9. * SPDX-License-Identifier: LGPL-2.1-or-later
  10. */
  11. #include "print_fields.h"
  12. int
  13. PRINT_TIMEX(struct tcb *const tcp, const kernel_ulong_t addr)
  14. {
  15. TIMEX_T tx;
  16. if (umove_or_printaddr(tcp, addr, &tx))
  17. return -1;
  18. PRINT_FIELD_FLAGS("{", tx, modes, adjtimex_modes, "ADJ_???");
  19. PRINT_FIELD_D(", ", tx, offset);
  20. PRINT_FIELD_D(", ", tx, freq);
  21. PRINT_FIELD_D(", ", tx, maxerror);
  22. PRINT_FIELD_D(", ", tx, esterror);
  23. PRINT_FIELD_FLAGS(", ", tx, status, adjtimex_status, "STA_???");
  24. PRINT_FIELD_D(", ", tx, constant);
  25. PRINT_FIELD_D(", ", tx, precision);
  26. PRINT_FIELD_D(", ", tx, tolerance);
  27. PRINT_FIELD_D(", time={", tx.time, tv_sec);
  28. PRINT_FIELD_U(", ", tx.time, tv_usec);
  29. PRINT_FIELD_D("}, ", tx, tick);
  30. PRINT_FIELD_D(", ", tx, ppsfreq);
  31. PRINT_FIELD_D(", ", tx, jitter);
  32. PRINT_FIELD_D(", ", tx, shift);
  33. PRINT_FIELD_D(", ", tx, stabil);
  34. PRINT_FIELD_D(", ", tx, jitcnt);
  35. PRINT_FIELD_D(", ", tx, calcnt);
  36. PRINT_FIELD_D(", ", tx, errcnt);
  37. PRINT_FIELD_D(", ", tx, stbcnt);
  38. PRINT_FIELD_D(", ", tx, tai);
  39. tprints("}");
  40. return 0;
  41. }