• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "defs.h"
2 
3 #include DEF_MPERS_TYPE(struct_xfs_dqstats)
4 
5 #include "xfs_quota_stat.h"
6 typedef struct xfs_dqstats struct_xfs_dqstats;
7 
8 #include MPERS_DEFS
9 
MPERS_PRINTER_DECL(bool,fetch_struct_quotastat,struct tcb * const tcp,const kernel_ulong_t data,void * p)10 MPERS_PRINTER_DECL(bool, fetch_struct_quotastat, struct tcb *const tcp,
11 		   const kernel_ulong_t data, void *p)
12 {
13 	struct xfs_dqstats *dq = p;
14 	struct_xfs_dqstats dqstat;
15 
16 	if (umove_or_printaddr(tcp, data, &dqstat))
17 		return false;
18 
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 }
36