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.

fetch_struct_xfs_quotastat.c 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2018 The strace developers.
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. */
  7. #include "defs.h"
  8. #include DEF_MPERS_TYPE(struct_xfs_dqstats)
  9. #include "xfs_quota_stat.h"
  10. typedef struct xfs_dqstats struct_xfs_dqstats;
  11. #include MPERS_DEFS
  12. MPERS_PRINTER_DECL(bool, fetch_struct_quotastat, struct tcb *const tcp,
  13. const kernel_ulong_t data, void *p)
  14. {
  15. struct xfs_dqstats *dq = p;
  16. struct_xfs_dqstats dqstat;
  17. if (umove_or_printaddr(tcp, data, &dqstat))
  18. return false;
  19. dq->qs_version = dqstat.qs_version;
  20. dq->qs_flags = dqstat.qs_flags;
  21. dq->qs_pad = dqstat.qs_pad;
  22. dq->qs_uquota.qfs_ino = dqstat.qs_uquota.qfs_ino;
  23. dq->qs_uquota.qfs_nblks = dqstat.qs_uquota.qfs_nblks;
  24. dq->qs_uquota.qfs_nextents = dqstat.qs_uquota.qfs_nextents;
  25. dq->qs_gquota.qfs_ino = dqstat.qs_gquota.qfs_ino;
  26. dq->qs_gquota.qfs_nblks = dqstat.qs_gquota.qfs_nblks;
  27. dq->qs_gquota.qfs_nextents = dqstat.qs_gquota.qfs_nextents;
  28. dq->qs_incoredqs = dqstat.qs_incoredqs;
  29. dq->qs_btimelimit = dqstat.qs_btimelimit;
  30. dq->qs_itimelimit = dqstat.qs_itimelimit;
  31. dq->qs_rtbtimelimit = dqstat.qs_rtbtimelimit;
  32. dq->qs_bwarnlimit = dqstat.qs_bwarnlimit;
  33. dq->qs_iwarnlimit = dqstat.qs_iwarnlimit;
  34. return true;
  35. }